Jump to content

Recommended Posts

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 :: AttributeError
1114 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

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.