ScreamMyName 100 Posted November 14, 2015 Share Posted November 14, 2015 Hello I'm trying to do some work on uigameoption.py Let's say i have something like this def __OnClickHudOff(self): if constInfo.HUD == 1: constInfo.HUD = 0 self.interface = interfaceModule.Interface() self.interface.HideAllQuestButton() chat.AppendChat(chat.CHAT_TYPE_INFO, "test") self.setHud[0].SetUp() self.setHud[1].Down() So it's basically the same thing as in game.py def __PressQKey(self): and it works but when i try to do it in uigameoption.py it doesn't work..in syserr i got 1114 14:44:24782 :: Traceback (most recent call last): 1114 14:44:24782 :: File "ui.py", line 1016, in CallEvent 1114 14:44:24783 :: File "ui.py", line 87, in __call__ 1114 14:44:24783 :: File "ui.py", line 69, in __call__ 1114 14:44:24784 :: File "uiGameOption.py", line 323, in __OnClickHudOff 1114 14:44:24784 :: File "interfaceModule.py", line 1225, in HideAllQuestButton 1114 14:44:24784 :: AttributeError1114 14:44:24784 :: : 1114 14:44:24784 :: 'Interface' object has no attribute 'questButtonList'1114 14:44:24784 :: So then I add in interfacemodule.py self.questButtonList = None Then I get an error 1114 14:49:24710 :: Traceback (most recent call last): 1114 14:49:24710 :: File "ui.py", line 1016, in CallEvent 1114 14:49:24710 :: File "ui.py", line 87, in __call__ 1114 14:49:24711 :: File "ui.py", line 69, in __call__ 1114 14:49:24711 :: File "uiGameOption.py", line 323, in __OnClickHudOff 1114 14:49:24711 :: File "interfaceModule.py", line 1226, in HideAllQuestButton 1114 14:49:24712 :: TypeError 1114 14:49:24712 :: : 1114 14:49:24712 :: 'NoneType' object is not iterable Which I have no idea what it means.. so can anyone help? What am I doing wrong :<? Link to comment Share on other sites More sharing options...
Shang 369 Posted November 14, 2015 Share Posted November 14, 2015 (edited) Try with: self.questButtonList = 0 Edited November 14, 2015 by Shang Link to comment Share on other sites More sharing options...
ScreamMyName 100 Posted November 14, 2015 Author Share Posted November 14, 2015 Try with: self.questButtonList = 0 I tried it and i got 1114 14:53:01760 :: 'int' object is not iterable Link to comment Share on other sites More sharing options...
Shang 369 Posted November 14, 2015 Share Posted November 14, 2015 Lol I wanted to put = [] and I put = 0 xD self.questButtonList = [] Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19657 Posted November 14, 2015 Honorable Member Share Posted November 14, 2015 I think not lucky to call the Interface class from interfaceModule.py more than once because of the __init__ function. Try to bind the self to the gameoptiondialog.objectDlg.BindInterface(self) like for whisper or inventory or dragonsoul etc. Link to comment Share on other sites More sharing options...
ScreamMyName 100 Posted November 14, 2015 Author Share Posted November 14, 2015 5 hours ago, Shang said: Lol I wanted to put = [] and I put = 0 xD self.questButtonList = [] I've tried self.questButtonList = [] and self.questButtonList = {} there is nothing in syserr but it doesn't work :P. Link to comment Share on other sites More sharing options...
ScreamMyName 100 Posted November 14, 2015 Author Share Posted November 14, 2015 5 hours ago, xP3NG3Rx said: I think not lucky to call the Interface class from interfaceModule.py more than once because of the __init__ function. Try to bind the self to the gameoptiondialog. objectDlg.BindInterface(self) like for whisper or inventory or dragonsoul etc. You mean something like this ? dlgInterface.BindInterface(self) 1114 22:00:33582 :: global name 'dlgInterface' is not defined Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19657 Posted November 15, 2015 Honorable Member Share Posted November 15, 2015 This is the hidden content, please Sign In or Sign Up 13 1 4 1 Link to comment Share on other sites More sharing options...
ScreamMyName 100 Posted November 15, 2015 Author Share Posted November 15, 2015 6 hours ago, xP3NG3Rx said: damn upgrade.rar I can't download it. Could you upload it somewhere else? Like mediafire or mega or even speedyshare Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now