Code
- ## game.py
- #### Antes de class GameWindow
- import time
- MESSENGER_LOGGINED = ""
- MESSENGER_STOPPING_TIME = 0
- #### Agregar en def Open(self)
- #### antes de self.Show()
- self.__msgLoginBoard = ui.Board()
- self.__msgLoginBoard.SetParent(self)
- self.__msgLoginBoard.SetSize(200, 40)
- self.__msgLoginBoard.SetPosition(wndMgr.GetScreenWidth() - 210, wndMgr.GetScreenHeight() - 200)
- self.__msgLoginBoard.Hide()
- self.__msgLoginBoard.memberName = ui.TextLine()
- self.__msgLoginBoard.memberName.SetParent(self.__msgLoginBoard)
- self.__msgLoginBoard.memberName.SetText("None")
- self.__msgLoginBoard.memberName.SetWindowHorizontalAlignCenter()
- self.__msgLoginBoard.memberName.SetWindowVerticalAlignCenter()
- self.__msgLoginBoard.memberName.SetHorizontalAlignCenter()
- self.__msgLoginBoard.memberName.SetVerticalAlignCenter()
- self.__msgLoginBoard.memberName.Show()
- #### Agregar en def OnUpdate(self)
- global MESSENGER_LOGGINED, MESSENGER_STOPPING_TIME
- if MESSENGER_LOGGINED != "" and time.clock() < MESSENGER_STOPPING_TIME:
- self.__msgLoginBoard.memberName.SetText("%s esta online!" % MESSENGER_LOGGINED)
- self.__msgLoginBoard.Show()
- else:
- self.__msgLoginBoard.Hide()
- MESSENGER_LOGGINED = ""
- MESSENGER_STOPPING_TIME = 0
- ## uiMessenger.py
- #### Agregar en def OnLogin
- import game, time
- game.MESSENGER_LOGGINED = name
- game.MESSENGER_STOPPING_TIME = time.clock() + 10.0
Fehlercode:
Code
- 0811 16:31:10430 ::
- networkModule.py(line:208) SetSelectCharacterPhase
- system.py(line:130) __pack_import
- system.py(line:110) _process_result
- introSelect.py(line:30) ?
- system.py(line:130) __pack_import
- system.py(line:110) _process_result
- interfaceModule.py(line:15) ?
- system.py(line:130) __pack_import
- system.py(line:110) _process_result
- uiMessenger.py(line:346) ?
- uiMessenger.py(line:791) MessengerWindow
- networkModule.SetSelectCharacterPhase - exceptions.NameError:name 'name' is not defined
- 0811 16:31:10431 :: ============================================================================================================
- 0811 16:31:10431 :: Abort!!!!
uimessenger.py
Code
- def OnLogin(self, groupIndex, key, name=None):
- if not name:
- name = key
- group = self.groupList[groupIndex]
- member = self.__AddList(groupIndex, key, name)
- member.SetName(name)
- member.Online()
- self.OnRefreshList()
- import game, time
- game.MESSENGER_LOGGINED = name
- game.MESSENGER_STOPPING_TIME = time.clock() + 10.0
Kann mir dabei jemand helfen?