Jump to content

Multipoint system in status


Recommended Posts

 

Good afternoon.
I am trying to implement the multipoint system in status, and the following error is appearing to me at the time I receive the warning about exceeding or putting 0 points in the statuses, since I thank you for the help.

Code:

    def ChooseCountPlusStat(self, statusKey):
        inputDialog = uiCommon.InputDialog()
        inputDialog.SetTitle(localeInfo.STATUS_BOX)
        inputDialog.SetMaxLength(2)
        inputDialog.SetNumberMode()
        inputDialog.SetFocus()
        inputDialog.SetAcceptEvent(lambda arg1=statusKey: self.ChooseCountPlusStatConfirm(arg1))
        inputDialog.SetCancelEvent(self.ChooseCountPlusStatHide)
        inputDialog.Open()
        self.inputDialog = inputDialog

    def ChooseCountPlusStatHide(self):
        self.inputDialog.Hide()

    def ChooseCountPlusStatConfirm(self, statusKey):
        self.ChooseCountPlusStatHide()
        statusPlusCommand=self.statusPlusCommandDict[statusKey]
        try:
            count = int(self.inputDialog.GetText())
            if count <= 0:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.STATUS_BOX_PLUS)
                return
            if count > 30:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.STATUS_BOX_INFO)
                return
            if count > 1:
                for i in xrange(count):
                    net.SendChatPacket(statusPlusCommand)
            else:
                net.SendChatPacket(statusPlusCommand)

        except ValueError:
            chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.STATUS_BOX_PLUS)

syserr:

1207 13:35:15709 :: Traceback (most recent call last):

1207 13:35:15709 ::   File "ui.py", line 1362, in CallEvent

1207 13:35:15964 ::   File "uiCharacter.py", line 1344, in <lambda>

1207 13:35:15964 ::   File "uiCharacter.py", line 1358, in ChooseCountPlusStatConfirm

1207 13:35:15965 :: NameError
1207 13:35:15965 :: : 
1207 13:35:15965 :: global name 'chat' is not defined
1207 13:35:15965 :: 

1207 13:36:32759 :: Traceback (most recent call last):

1207 13:36:32759 ::   File "ui.py", line 1362, in CallEvent

1207 13:36:32760 ::   File "uiCharacter.py", line 1344, in <lambda>

1207 13:36:32760 ::   File "uiCharacter.py", line 1361, in ChooseCountPlusStatConfirm

1207 13:36:32761 :: NameError
1207 13:36:32761 :: : 
1207 13:36:32761 :: global name 'chat' is not defined
1207 13:36:32761 :: 

I would appreciate your help.
Great afternoon to all.

 

 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.