Robert The Rebuilder wrote:What value do you have for "pythonfile" in your clickable book's AlcScript? Does it match the class name in your Python file?
Could you attach your Python files to your reply so that we can look at them? [First zip them before attaching them, since the forum won't allow .py file attachments]
Well, D'Lanor was able to help with my original problem. I'm stuck now with a problem similar to what Andy had awhile back with his books in CampBravo. Several of the linking books don't have linking panels. Namely Gahreesen, Eder Tsogal and Delin and The link to the city. And my link to the GZ throws up a tuple error.
The elf file shows this:
- Code: Select all
(06/20 23:06:16) Someone clicked on object EderTsogalLinkBook
(06/20 23:06:16) It was you
(06/20 23:06:16) Trying book M-NegilahnBook with page(s) ['M-NegilahnBook']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book M-DerenoBook with page(s) ['M-DerenoBook']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book M-PayiferenBook with page(s) ['M-PayiferenBook']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book M-TetsonotBook with page(s) ['M-TetsonotBook']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book jrnlNegilahn with page(s) ['NegilahnJournal']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book LIBMinkataBook with page(s) ['LIBMinkataBook']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book LIBJalakBook with page(s) ['LIBJalakBook']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book DniLinkingBookToGrsn with page(s) ['DniLinkingBookToGrsn']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book DniLinkingBookToGZ with page(s) ['DniLinkingBookToGZ']
(06/20 23:06:16) No match
(06/20 23:06:16) Trying book EderTsogalLinkBook with page(s) ['EderTsogalLinkBook']
(06/20 23:06:16) Match found! Start opening book...
(06/20 23:06:16) CityBookGUI: IOpenBook: Page(s) requested ['EderTsogalLinkBook']
(06/20 23:06:16) Showing EderTsogalLinkBook, link destination EderTsogal
(06/20 23:06:16) 1 item(s) created, linking page(s): 1
(06/20 23:06:16) CityBookGUI: OnNotify called
(06/20 23:06:16) BookNotify: Show book, event=1
(06/20 23:06:16) CityBookGUI: OnNotify called
(06/20 23:06:18) CityBookGUI: OnNotify called
(06/20 23:06:18) BookNotify: Hide book, event=2
(06/20 23:06:23) CityBookGUI: OnNotify called
(06/20 23:06:23) Someone clicked on object DniLinkingBookToGZ
(06/20 23:06:23) It was you
(06/20 23:06:23) Trying book M-NegilahnBook with page(s) ['M-NegilahnBook']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book M-DerenoBook with page(s) ['M-DerenoBook']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book M-PayiferenBook with page(s) ['M-PayiferenBook']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book M-TetsonotBook with page(s) ['M-TetsonotBook']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book jrnlNegilahn with page(s) ['NegilahnJournal']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book LIBMinkataBook with page(s) ['LIBMinkataBook']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book LIBJalakBook with page(s) ['LIBJalakBook']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book DniLinkingBookToGrsn with page(s) ['DniLinkingBookToGrsn']
(06/20 23:06:23) No match
(06/20 23:06:23) Trying book DniLinkingBookToGZ with page(s) ['DniLinkingBookToGZ']
(06/20 23:06:23) Match found! Start opening book...
(06/20 23:06:23) CityBookGUI: IOpenBook: Page(s) requested ['DniLinkingBookToGZ']
(06/20 23:06:23) Traceback (most recent call last):
(06/20 23:06:23) File "C:\DOCUME~1\HP_Owner\LOCALS~1\Temp\tmp1133.tmp\CityBookGUI.py", line 44, in OnNotify
(06/20 23:06:23) File "C:\DOCUME~1\HP_Owner\LOCALS~1\Temp\tmp1133.tmp\CityBookGUI.py", line 99, in IOpenBook
(06/20 23:06:23) ValueError: unpack tuple of wrong size
The Tsogal/Gahreesen/City books all open properly, but the book doesn't show a link panel, and there is no hotspot. While the GZ book doesn't even open.
This is the corresponding code for the link panels:
- Code: Select all
BookPages = {'M-NegilahnBook': (PageStart + ImgStart + 'xlinkpanelnegilahndef' + ImgEnd + AlignCenter), 'M-DerenoBook': (PageStart + ImgStart + 'xlinkpanelderenodefau' + ImgEnd + AlignCenter), 'M-PayiferenBook': (PageStart + ImgStart + 'xlinkpanelpayiferende' + ImgEnd + AlignCenter), 'M-TetsonotBook': (PageStart + ImgStart + 'xlinkpaneltetsonotdef' + ImgEnd + AlignCenter), 'NegilahnJournal': (PageStart + xJournalContents), 'LIBMinkataBook': (PageStart + ImgStart + 'xlinkpanelminkatadefa' + ImgEnd + AlignCenter), 'LIBJalakBook': (PageStart + ImgStart + 'xlinkpaneljalakdefaul' + ImgEnd + AlignCenter), 'DniLinkingBookToGrsn': (PageStart + ImgStart + 'xlinkpanelgarrisondef' + ImgEnd + AlignCenter), 'BahroRockBook': (PageStart + ImgStart + 'xlinkpanelcitygreattr' + ImgEnd + AlignCenter), 'DniLinkingBookToGZ': (PageStart + ImgStart + 'xlinkpanelgrtzerolink' + ImgEnd + AlignCenter), 'EderTsogalLinkBook': (PageStart + ImgStart + 'xlinkpaneltsogarden-0' + ImgEnd + AlignCenter), 'EderDelinLinkBook': (PageStart + ImgStart + 'xlinkpanelederdelinde' + ImgEnd + AlignCenter)}
And this is the code for IopenBook =
- Code: Select all
def IOpenBook(self, ageBook, bkPages = None):
global ourBook
global bkLinks
print ('%s: IOpenBook: Page(s) requested %s' % (self.__class__.__name__,
bkPages,))
if (type(bkPages) == type(None)):
print 'ERROR: no pages defined'
return
if (not (ageBook in modPageDefs.AgeBooks)):
print ('ERROR: Definition %s does not exist in AgeBooks' % ageBook)
return
bkParams = modPageDefs.AgeBooks[ageBook]
(bkCover, bkFont, startOpen, forceOwned, bookGUI, width, height,) = bkParams
PageDef = (bkCover + bkFont)
if (not startOpen):
if (not self.IsThereACover(PageDef)):
print 'Warning: Missing cover, forcing book open'
startOpen = 1
PageCount = xLinkingBookDefs.kFirstLinkPanelID
bkLinks = []
for bkPage in bkPages:
if (not (bkPage in modPageDefs.LinkDestinations)):
print ('Warning: %s skipped, definition does not exist in LinkDestinations' % bkPage)
continue
pgParams = modPageDefs.LinkDestinations[bkPage]
(bkAge, spawnPoint, spTitle, linkRule,) = pgParams
alink = 1
if ((type(bkAge) != type(None)) and forceOwned):
print ('Ownership check for %s book' % bkAge)
vault = ptVault()
ainfo = ptAgeInfoStruct()
ainfo.setAgeFilename(bkAge)
alink = vault.getOwnedAgeLink(ainfo)
if alink:
print ('Showing %s, link destination %s' % (bkPage,
bkAge,))
if (type(bkAge) != type(None)):
t = (PageCount,
bkPage,
bkAge,
spawnPoint,
spTitle,
linkRule,)
bkLinks.append(t)
PageDef = ((PageDef + (modPageDefs.BookPages[bkPage] % PageCount)) + '<pb>')
else:
PageDef = ((PageDef + modPageDefs.BookPages[bkPage]) + '<pb>')
PageCount = (PageCount + 1)
else:
print ('No owner of age %s so we are not showing %s' % (bkAge,
bkPage,))
if (PageCount == xLinkingBookDefs.kFirstLinkPanelID):
print 'No pages created...'
return
else:
TotalCount = (PageCount - xLinkingBookDefs.kFirstLinkPanelID)
print ('%d item(s) created, linking page(s): %d' % (TotalCount,
len(bkLinks),))
PageDef = PageDef[:-4]
ourBook = ptBook(PageDef, self.key)
ourBook.setSize(width, height)
ourBook.setGUI(bookGUI)
ourBook.show(startOpen)