Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 14:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



HELP Interface öffnen durch F7 (Python)

Discussion on HELP Interface öffnen durch F7 (Python) within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
.Scare™'s Avatar
 
elite*gold: 66
Join Date: Jan 2012
Posts: 234
Received Thanks: 145
HELP Interface öffnen durch F7 (Python)

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
.Scare™ is offline  
Reply

Tags
gui, interface, python


Similar Threads Similar Threads
Warrock 2x öffnen durch .BAT datei?
01/29/2012 - WarRock - 2 Replies
Ja meine frage ist, ob man mit selbst geschriebene .BAT - Datei warrock 2x öffnen kann?
durch lua ein programm öffnen
12/04/2011 - Metin2 Private Server - 1 Replies
Ist es möglich, wenn ich ein Python Befehl in der game stehen habe, dass ich damit ein Proramm öffne, das im Client ist (also in einer .eix datei)? Wenn ja, wie geht das? Thx+MfG Jan
Durch Quest Händler nicht mehr öffnen
12/06/2009 - Metin2 Private Server - 5 Replies
Hi ich habe ein kleines schei* Problem undzwar kann man Quests ned mehr abbrchen :/ Ich hab i-was in den SF gemacht weiß aber leider ned mehr was :( kann mir wer hefen? :s
Datei durch Addons öffnen lassen?
05/02/2007 - World of Warcraft - 5 Replies
Huhu, wollt ma fragen, ob man z.B eine .jpg durch ein WoW Addon öffnen lassen kann, sobald man es in WoW läd.. Müsste doch eigt. funktionieren, oder?



All times are GMT +2. The time now is 14:09.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.