Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 06:31

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

Advertisement



[Python]Check Show Problem

Discussion on [Python]Check Show Problem within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
Noa_'s Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 605
Received Thanks: 580
[Python]Check Show Problem

Hallo, ich hab das Tutorial von .reicon erweitert und mein Problem war das ich mehrere Fenstern auf einmal öffnen kann,
hier ein screen


uilernboard.py


game.py(nur die funktion)


lernboard wird über ein hotkey gestartet
PHP Code:
onPressKeyDict[app.DIK_F5]    = lambda self.lernboard() 
uilernboard.py ist bereits oben als import eingetragen.

Mein genauer Problem ist das die abfrage
PHP Code:
if not ToClass.IsShow(): 
übersprungen oder ignoriert wird (weis nicht genau), jedenfalls kann ich mehrere Fenstern gleichzeitig aufmachen und würde gerne wissen was ich falsch mache.

Mfg Noa
Noa_ is offline  
Old 06/22/2013, 14:55   #2
 
[uLow]Beni's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 1,781
Received Thanks: 618
Code:
ToClass=uilernboard.LernWindow()
Erstellt eine Instance von uilernboard.LernWindow, diese wird komplett neuerstellt
am besten machst du in der Init funktion von der game.py:
Code:
self.lernboardInstance=uilernboard.LernWindow()
self.lernboardInstance.Hide()
und in der lernboard Funktion machst du dann nur
Code:
self.lernboardInstance.Show()
[uLow]Beni is offline  
Thanks
2 Users
Old 06/22/2013, 15:16   #3
 
Noa_'s Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 605
Received Thanks: 580
sehr nice hat geklappt danke, aber wieso ? würde mich gern interessieren, ich möchte python lernen >,>
Noa_ is offline  
Old 06/22/2013, 15:52   #4

 
elite*gold: 0
Join Date: Mar 2013
Posts: 2,449
Received Thanks: 6,448
Kannst es auch durch Werte in der constinfo steuern.
zB so:
Code:
def Beispiel(self):
	if constInfo.Beispiel == 0:
		...
		constInfo.Beispiel = 1
	else:
		...
		constInfo.Beispiel = 0
Lord iRemix is offline  
Thanks
1 User
Old 06/23/2013, 10:28   #5
 
[uLow]Beni's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 1,781
Received Thanks: 618
Quote:
Originally Posted by ΞΠ∪Μ View Post
sehr nice hat geklappt danke, aber wieso ? würde mich gern interessieren, ich möchte python lernen >,>
Naja ich zeigs mal mit einem Beispiel:
Code:
class Example(object):
     def __init__(self, key):
          self.key = key


instance1 = Example(3)
instance2 = Example(2)

instance1.key # = 3
instance2.key # = 2

instance1 == Example # False
instance2 == Example() # False


isinstance(instance1, Example) # True
isinstance(instance2, Example) # True
[uLow]Beni is offline  
Old 06/23/2013, 16:15   #6
 
Noa_'s Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 605
Received Thanks: 580
also war mein Fehler den pfad zur klasse?
PHP Code:
instance1 == Example # False
instance2 == Example() # False 
Noa_ is offline  
Reply


Similar Threads Similar Threads
python code check for mix file if found deleted
12/31/2012 - Metin2 Private Server - 1 Replies
i saw i python code on forum that cheks for mix file and if founds one is deleted can some one post this code ?
[Python Problem]HELP ME!
12/11/2012 - Metin2 Private Server - 0 Replies
1211 17:23:06863 :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=19) - Strange Skill Attribute(TOOGLE) 1211 17:23:06864 :: CPythonSkill::RegisterSkillDesc(dwSkillIndex=4) - Strange Skill Attribute(TOOGLE) 1211 17:23:18290 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR 1211 17:24:33887 :: Traceback (most recent call last): 1211 17:24:33887 :: File "networkModule.py", line 231, in SetGamePhase 1211 17:24:33887 :: File "system.py", line 130, in __pack_import 1211 17:24:33887 :: ...
Python Problem!!!
08/22/2012 - Metin2 - 2 Replies
HeyHo ich bins mal wieder mit einem Python Problem xD undzwar wollte ich einfach mal wissen wie man VID's über eine gnaze map scannen kann =) ich kriege es nur so hin das ich alle VID's in sichtweite gefasst kriege bitte um hilfe!!!:handsdown::handsdown:
[PROBLEM]Python Uhr
03/18/2012 - General Coding - 3 Replies
Hallo, Ich habe solch ein Script lt = time.localtime() jahr,monat,tag,stunde,minute,sekunde = lt zeit = "%02i:%02i:%02i" % (stunde, minute, sekunde) Nun mache ich z.b. "text" : zeit,
Python Problem.
10/29/2011 - Metin2 Private Server - 4 Replies
Hey Leute. Ich wollte gerade Python auf Freebsd 8.2 installieren nach dem Tut. http://www.elitepvpers.com/forum/metin2-pserver-g uides-strategies/937110-how2-python-f-r-alles.html Nach make install clean kommt ein Fenster ich gehe auf Close doch nun kommt. Horny# cd /usr/ports/lang/python Horny# make install clean ===> Installing for python-2.7,2 ===> python-2.7,2 depends on file: /usr/local/bin/python2.7 - not found



All times are GMT +2. The time now is 06:31.


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.