Jump to content
  • 0

Quests aren't displayed


Galet

Question

  • VIP

Hello, since some times, I got a strange bug, my quests are present in the left of my screen but when I click on it (or if I do nothing) my quests aren't displayed in "Quests" pannel "n" key.
 

So I looked in my syserr and I guess I found the bug.

 

Here's my syserr :

0201 00:24:11523 :: invalid idx 0
0201 00:24:28704 :: Traceback (most recent call last):

0201 00:24:28704 ::   File "game.py", line 785, in RefreshQuest

0201 00:24:28705 ::   File "interfaceModule.py", line 606, in RefreshQuest

0201 00:24:28705 ::   File "uiCharacter.py", line 679, in RefreshQuest

0201 00:24:28705 :: ValueError
0201 00:24:28705 :: : 
0201 00:24:28705 :: too many values to unpack
0201 00:24:28705 :: 

0201 00:24:28738 :: Traceback (most recent call last):

0201 00:24:28738 ::   File "game.py", line 785, in RefreshQuest

0201 00:24:28739 ::   File "interfaceModule.py", line 606, in RefreshQuest

0201 00:24:28739 ::   File "uiCharacter.py", line 679, in RefreshQuest

0201 00:24:28739 :: ValueError
0201 00:24:28739 :: : 
0201 00:24:28739 :: too many values to unpack
0201 00:24:28739 :: 

0201 00:24:28740 :: Traceback (most recent call last):

0201 00:24:28740 ::   File "game.py", line 785, in RefreshQuest

0201 00:24:28740 ::   File "interfaceModule.py", line 606, in RefreshQuest

0201 00:24:28741 ::   File "uiCharacter.py", line 679, in RefreshQuest

0201 00:24:28741 :: ValueError
0201 00:24:28741 :: : 
0201 00:24:28741 :: too many values to unpack
0201 00:24:28741 :: 

0201 00:24:28741 :: Traceback (most recent call last):

0201 00:24:28741 ::   File "game.py", line 785, in RefreshQuest

0201 00:24:28741 ::   File "interfaceModule.py", line 606, in RefreshQuest

0201 00:24:28742 ::   File "uiCharacter.py", line 679, in RefreshQuest

0201 00:24:28742 :: ValueError
0201 00:24:28742 :: : 
0201 00:24:28742 :: too many values to unpack
0201 00:24:28742 :: 

0201 00:24:28742 :: Traceback (most recent call last):

0201 00:24:28742 ::   File "game.py", line 785, in RefreshQuest

0201 00:24:28743 ::   File "interfaceModule.py", line 606, in RefreshQuest

0201 00:24:28743 ::   File "uiCharacter.py", line 679, in RefreshQuest

0201 00:24:28743 :: ValueError
0201 00:24:28743 :: : 
0201 00:24:28743 :: too many values to unpack
0201 00:24:28743 :: 


I conclude that the problem are the "too many values to unpack".

 

Did someone have a fix please ?

Have a nice day. :)

Link to comment
  • Answers 12
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

12 answers to this question

Recommended Posts

  • 0
  • VIP

I changed some things, but I'm pretty sure it's about python 2.7 ^^

 

Here's the "buggy" piece of code, i'm pretty sure the problem is from it.

 


for i in questRange[:questCount]:
            (questName, questIcon, questCounterName, questCounterValue) = quest.GetQuestData(self.questShowingStartIndex+i)

            self.questNameList[i].SetText(questName)
            self.questNameList[i].Show()
            self.questLastCountList[i].Show()
            self.questLastTimeList[i].Show()

Link to comment
  • 0
  • VIP

The code is right indeed but :

 

i updated my binaries to python 2.7, so I think this bug is due to this change.

 

If I put "for i, k, m in questRange[:questCount]:" for example, the syserr will be different.

 

(need 1 more value to unpack).

Link to comment
  • 0

try like this:

	for i in questRange[:questCount].iteritems():
            (questName, questIcon, questCounterName, questCounterValue) = quest.GetQuestData(self.questShowingStartIndex+i)

            self.questNameList[i].SetText(questName)
            self.questNameList[i].Show()
            self.questLastCountList[i].Show()
            self.questLastTimeList[i].Show()
Link to comment
  • 0

yes, without iteritems it  will loop only over the keys (in your case 4), but the game can return less or more then 4 values and that's why you need to use iteritems() to loop over keys + values at the same time

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.