Premium mackabro2 216 Posted March 23, 2015 Premium Share Posted March 23, 2015 Can anyone tell me how can I make one Puchar def game.py in another py already tried these form but not one was self.abrir = game.GameWindow() self.abrir.abrirlogo() game.GameWindow.abrirlogo() x=game.GameWindow.abrirlogo() x=game.GameWindow().abrirlogo() Link to comment Share on other sites More sharing options...
Premium mackabro2 216 Posted March 23, 2015 Author Premium Share Posted March 23, 2015 bump Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted March 23, 2015 Premium Share Posted March 23, 2015 add in the first import abrir If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Premium Runah 19 Posted March 23, 2015 Premium Share Posted March 23, 2015 "import abrir" A new project is coming up very soon. Stay tunned. Metin2dev Topic Nexus2 Facebook Nexus2 Discord Link to comment Share on other sites More sharing options...
Active Member Koray 1998 Posted March 23, 2015 Active Member Share Posted March 23, 2015 You can not use directly game function, so you need a hook add your script under def __init__ self.Inithookabrir()Add this function in your script def Inithookabrir(self): global oldAbrir oldAbrir = game.GameWindow.abrirlogo game.GameWindow.abrirlogo = self.Abrir and you use with like this oldAbrir = 0 def Abrir(self): """add Your functions""" global oldAbrir self.oldAbrir() Link to comment Share on other sites More sharing options...
Premium mackabro2 216 Posted March 23, 2015 Author Premium Share Posted March 23, 2015 You can not use directly game function, so you need a hook add your script under def __init__ self.Inithookabrir() Add this function in your script def Inithookabrir(self): global oldAbrir oldAbrir = game.GameWindow.abrirlogo game.GameWindow.abrirlogo = self.Abrir and you use with like this oldAbrir = 0 def Abrir(self): """add Your functions""" global oldAbrir self.oldAbrir() 0323 13:01:48104 :: Traceback (most recent call last): 0323 13:01:48104 :: File "ui.py", line 1022, in CallEvent 0323 13:01:48109 :: 0323 13:01:48109 :: apply(self.eventFunc, self.eventArgs) 0323 13:01:48109 :: File "Djssnob.py", line 58, in a_func 0323 13:01:48110 :: 0323 13:01:48110 :: self.oldAbrir() 0323 13:01:48110 :: AttributeError 0323 13:01:48110 :: : 0323 13:01:48110 :: 'Dialog1' object has no attribute 'oldAbrir' 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