Jump to content

Recommended Posts

So, I was looking to add this into intrologin.py:
 

			...
			self.selectConnectButton	= GetObject("SelectConnectButton")
			self.loginButton			= GetObject("LoginButton")
			self.loginExitButton		= GetObject("LoginExitButton")
			#testButtonHey added by me
			self.testButtonHey			= GetObject("TestButtonHey")
a bit down below:

self.loginButton.SetEvent(ui.__mem_func__(self.__OnClickLoginButton))
        self.loginExitButton.SetEvent(ui.__mem_func__(self.__OnClickExitButton))
        
        #new added for test
        self.testButtonHey.SetEvent(ui.__mem_func__(self.__OnClickExitButton))
        #new added for test
        self.serverList.SetEvent(ui.__mem_func__(self.__OnSelectServer))
        
        self.idEditLine.SetReturnEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))
        self.idEditLine.SetTabEvent(ui.__mem_func__(self.pwdEditLine.SetFocus))



However, it will crash, and this syserr:
 

0216 16:26:00814 :: Traceback (most recent call last):

0216 16:26:00814 ::   File "introLogo.py", line 60, in OnUpdate

0216 16:26:00814 ::   File "networkModule.py", line 177, in SetLoginPhase

0216 16:26:00814 ::   File "system.py", line 130, in __pack_import

0216 16:26:00814 ::   File "
0216 16:26:00815 :: introLogin.py
0216 16:26:00815 :: ", line 
0216 16:26:00815 :: 595
0216 16:26:00815 :: 

0216 16:26:00815 ::     
0216 16:26:00815 :: self.serverList.SetEvent(ui.__mem_func__(self.__OnSelectServer))

0216 16:26:00815 ::     
0216 16:26:00815 :: ^

0216 16:26:00815 :: IndentationError
0216 16:26:00815 :: : 
0216 16:26:00815 :: unexpected indent
0216 16:26:00815 ::

(SVF: 

)

How can I fix it? (I've moved it up and down, and the next line of code will be the "error)

Edited by blaize
Link to comment
https://metin2.dev/topic/30384-cant-create-buttons-inside-introloginpy/
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

13 minutes ago, Sherer said:

Check the TABs (seems that you put incorrect number of tabulators).

Yes, that was one of the problem (thank you!)
Now, i get this in syserr:
 

0216 17:24:01602 :: 
introLogin.py(line:534) __LoadScript
ui.py(line:2704) GetChild

LoginWindow.__LoadScript.BindObject - <type 'exceptions.KeyError'>:'TestButtonHey'

0216 17:24:01602 :: ============================================================================================================
0216 17:24:01602 :: Abort!!!!

Is this because I have to button on login with TestButtonHey?

Edit// Yeah, that was the problem. Added something in the loginwindow and now works. 

Edited by blaize

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.