HELP Interface öffnen durch F7 (Python)

04/11/2013 22:40 .Scare™#1
Hallo com,


ich beschäftige mich grad mit metin2 und Python und möchte eine GUI durch drücken der F7 öffnen.

nun geht dies bei mir nicht so ganz, weis aber nicht warum....
weis einer wo ich hier den Fehler habe?

mfg

game.py
PHP Code:
onPressKeyDict[app.DIK_F7]    = lambda self.__expinterface()

#expinterface
    
def __expinterface(self):
        
import expinterface
        self
.expinterface expinterface.OptionDialog()
        
self.expinterface.Show() 
Dies sollte ja eigentlich stimmen, oder nicht?

dan in der expinterface.py hab ich das hier:
PHP Code:
import ui
import chat
import app
import player
import net
import time

class EXPinterface(ui.Board):

        
def __init__(self):
            
ui.Board.__init__(self)
            
self.LoadForm()
        
        
def __del__(self):
            
ui.Board.__del__(self)    

        
def Show(self):
            
ui.Board.Show(self)    
        
        
def LoadForm(self):
            
self.SetCenterPosition() 
            
self.SetSize(150150
            
self.AddFlag("movable")    
            
self.Show() 
            
self.LoadButton() 
        
        
def LoadButton(self):
            
self.GildenExpButton.SetParent(self
            
self.GildenExpButton.SetUpVisual("d:/ymir work/ui/public/xlarge_button_01.sub"
            
self.GildenExpButton.SetOverVisual("d:/ymir work/ui/public/xlarge_button_02.sub")
            
self.GildenExpButton.SetDownVisual("d:/ymir work/ui/public/xlarge_button_03.sub"
            
self.GildenExpButton.SetText("On / Off"
            
self.GildenExpButton.SetPosition(8020
            
self.GildenExpButton.SetEvent(ui.__mem_func__(self.LoadText1))
            
self.GildenExpButton.Show()
            
        
def LoadText1(self):
            
self.Text1 ui.TextLine()
            
self.Text1.SetParent(self)
            
self.Text1.SetText("EXP an Gilde")
            
self.Text1.SetPosition(20,20)
            
self.Text1.Show()
            
            
StartDialog EXPinterface()
            
StartDialog.Show() 
der Fehler ist:
PHP Code:
0411 22:31:27150 :: Traceback (most recent call last):

0411 22:31:27150 ::   File "game.py"line 1325in OnKeyDown

0411 22
:31:27150 ::   File "game.py"line 339in <lambda>

0411 22:31:27150 ::   File "game.py"line 2216in __expinterface

0411 22
:31:27150 ::   File "system.py"line 130in __pack_import

0411 22
:31:27150 ::   File "system.py"line 64in __init__

0411 22
:31:27150 :: AttributeError
0411 22
:31:27151 :: : 
0411 22:31:27151 :: 'NoneType' object has no attribute 'split'
0411 22:31:27151 :: 
die game.py habe ich grad in die root gepackt und das expinterface hab ich mit dem python loader injectet.

ich könnte mir auch grad fast denken das da der hund begraben ist.

ich teste es und gebe euch gleich noch ein Edit hinzu.

mfg und danke

EDIT1: Also habe nun auch die expinterface.py in den root gepackt, dennoch geht es nicht..

Fehler:
PHP Code:

0411 22
:44:36090 ::   File "game.py"line 1325in OnKeyDown

0411 22
:44:36090 ::   File "game.py"line 339in <lambda>

0411 22:44:36090 ::   File "game.py"line 2216in __expinterface

0411 22
:44:36090 ::   File "system.py"line 130in __pack_import

0411 22
:44:36090 ::   File "
0411 22:44:36090 :: <string>
0411 22:44:36090 :: "
line 
0411 22
:44:36090 :: 51
0411 22
:44:36090 :: 

0411 22:44:36090 ::     
0411 22:44:36090 :: StartDialog.Show()
0411 22:44:36090 :: 

0411 22:44:36090 ::  
0411 22:44:36090 :: ^

0411 22:44:36090 :: SyntaxError
0411 22
:44:36090 :: : 
0411 22:44:36090 :: invalid syntax
0411 22
:44:36090 :: 

0411 22:44:36091 :: Traceback (most recent call last):

0411 22:44:36091 ::   File "game.py"line 1325in OnKeyDown

0411 22
:44:36091 ::   File "game.py"line 339in <lambda>

0411 22:44:36091 ::   File "game.py"line 2216in __expinterface

0411 22
:44:36091 ::   File "system.py"line 130in __pack_import

0411 22
:44:36091 ::   File "
0411 22:44:36091 :: <string>
0411 22:44:36091 :: "
line 
0411 22
:44:36091 :: 51
0411 22
:44:36091 :: 

0411 22:44:36091 ::     
0411 22:44:36091 :: StartDialog.Show()

0411 22:44:36091 :: ^

0411 22:44:36091 :: SyntaxError
0411 22
:44:36091 :: : 
0411 22:44:36091 :: invalid syntax
0411 22
:44:36091 :: 

hatt sich erledigt, close oder delete request ist drausen.

mfg