Problema prieten online

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Ok, de aici deduc ca tu ai locale, si nu localeinfo in root, deci in uimessenger.py modifica
self.SetName(localeInfo.MESSENGER_FRIEND)
cu
self.SetName(locale.MESSENGER_FRIEND)
si in importuri lasa
import locale
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
darkallience3
Nivel 6

Nivel 6
Mesaje: 952
Membru din: 17 Dec 2013, 15:03
Server: Metin2Andromeda
Regat: Jinno
Aprecieri: 294  
Mulţumiri: 183  
Medalii

[RaffaeL] scrie: ↑06 Feb 2020, 18:13 Ok, de aici deduc ca tu ai locale, si nu localeinfo in root, deci in uimessenger.py modifica
self.SetName(localeInfo.MESSENGER_FRIEND)
cu
self.SetName(locale.MESSENGER_FRIEND)
si in importuri lasa
import locale
Devine enervat , in fisierul locale am 2 fisiere - LOCALE.TXT si locale_interface.TXT
si in ambele am acel messenger friend prieteni
ERROARE
Warning0206 18:19:22105 :: 'module' object has no attribute 'MESSENGER_FRIEND'
Afișează semnătura
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Ok. Raspunde-mi te rog la o intrebare: ai adaugat ceea ce lipseste in uimessenger.py(din fisierul resursei in fisierul clientului tau) sau le-ai inlocuit pur si simplu?
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
darkallience3
Nivel 6

Nivel 6
Mesaje: 952
Membru din: 17 Dec 2013, 15:03
Server: Metin2Andromeda
Regat: Jinno
Aprecieri: 294  
Mulţumiri: 183  
Medalii

[RaffaeL] scrie: ↑06 Feb 2020, 18:56 Ok. Raspunde-mi te rog la o intrebare: ai adaugat ceea ce lipseste in uimessenger.py(din fisierul resursei in fisierul clientului tau) sau le-ai inlocuit pur si simplu?
intra game.py si bagi astea 2 :

import uiPopup
import time

ATENTIE !!!!!
sa nu fie de bagate deja iar voi sa le bagati inca o data !
__________________________________________________________________________

cauta in game.py def __ServerCommand_Build(self):

si bagi sub el asta:

"spop" : self.__ShowPopup,

ar trebuie sa arate cam asa :

def __ServerCommand_Build(self):
serverCommandList={
"ConsoleEnable" : self.__Console_Enable,
"DayMode" : self.__DayMode_Update,
"PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
"CloseRestartWindow" : self.__RestartDialog_Close,
"OpenPrivateShop" : self.__PrivateShop_Open,
"PartyHealReady" : self.PartyHealReady,
"ShowMeSafeboxPassword" : self.AskSafeboxPassword,
"CloseSafebox" : self.CommandCloseSafebox,
"spop" : self.__ShowPopup,

_________________________________________________________________________________

te duci jos de tot in game.py si bagi asta :

def __ShowPopup(self, arg):
self.pop = uiPopup.PopupMsg()
data = arg.split("|")
self.pop.SetType(int(data[0]))
self.pop.SetMsg(data[1])
self.pop.Show()

class WaitingDialog(ui.ScriptWindow):

def __init__(self):
ui.ScriptWindow.__init__(self)
self.__LoadDialog()
self.eventTimeOver = lambda *arg: None
self.eventExit = lambda *arg: None

def __del__(self):
ui.ScriptWindow.__del__(self)

def __LoadDialog(self):
try:
PythonScriptLoader = ui.PythonScriptLoader()
PythonScriptLoader.LoadScriptFile(self, "UIScript/WarteSchleife.py")

except:
import exception
exception.Abort("WaitingDialog.LoadDialog.BindObject")

def Open(self, waitTime):
curTime = time.clock()
self.endTime = curTime + waitTime

self.Show()

def Close(self):
self.Hide()

def Destroy(self):
self.Hide()

def SAFE_SetTimeOverEvent(self, event):
self.eventTimeOver = ui.__mem_func__(event)

def SAFE_SetExitEvent(self, event):
self.eventExit = ui.__mem_func__(event)

def OnUpdate(self):
lastTime = max(0, self.endTime - time.clock())
if 0 == lastTime:
self.Close()
self.eventTimeOver()
else:
return

def OnPressExitKey(self):
self.Close()
return TRUE
Am bagat asta in uiscript :
Si astea in root :
Si am facut tutorialul de mai sus pentru game.py
Afișează semnătura
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

darkallience3 scrie: ↑06 Feb 2020, 19:08
[RaffaeL] scrie: ↑06 Feb 2020, 18:56 Ok. Raspunde-mi te rog la o intrebare: ai adaugat ceea ce lipseste in uimessenger.py(din fisierul resursei in fisierul clientului tau) sau le-ai inlocuit pur si simplu?
intra game.py si bagi astea 2 :

import uiPopup
import time

ATENTIE !!!!!
sa nu fie de bagate deja iar voi sa le bagati inca o data !
__________________________________________________________________________

cauta in game.py def __ServerCommand_Build(self):

si bagi sub el asta:

"spop" : self.__ShowPopup,

ar trebuie sa arate cam asa :

def __ServerCommand_Build(self):
serverCommandList={
"ConsoleEnable" : self.__Console_Enable,
"DayMode" : self.__DayMode_Update,
"PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
"CloseRestartWindow" : self.__RestartDialog_Close,
"OpenPrivateShop" : self.__PrivateShop_Open,
"PartyHealReady" : self.PartyHealReady,
"ShowMeSafeboxPassword" : self.AskSafeboxPassword,
"CloseSafebox" : self.CommandCloseSafebox,
"spop" : self.__ShowPopup,

_________________________________________________________________________________

te duci jos de tot in game.py si bagi asta :

def __ShowPopup(self, arg):
self.pop = uiPopup.PopupMsg()
data = arg.split("|")
self.pop.SetType(int(data[0]))
self.pop.SetMsg(data[1])
self.pop.Show()

class WaitingDialog(ui.ScriptWindow):

def __init__(self):
ui.ScriptWindow.__init__(self)
self.__LoadDialog()
self.eventTimeOver = lambda *arg: None
self.eventExit = lambda *arg: None

def __del__(self):
ui.ScriptWindow.__del__(self)

def __LoadDialog(self):
try:
PythonScriptLoader = ui.PythonScriptLoader()
PythonScriptLoader.LoadScriptFile(self, "UIScript/WarteSchleife.py")

except:
import exception
exception.Abort("WaitingDialog.LoadDialog.BindObject")

def Open(self, waitTime):
curTime = time.clock()
self.endTime = curTime + waitTime

self.Show()

def Close(self):
self.Hide()

def Destroy(self):
self.Hide()

def SAFE_SetTimeOverEvent(self, event):
self.eventTimeOver = ui.__mem_func__(event)

def SAFE_SetExitEvent(self, event):
self.eventExit = ui.__mem_func__(event)

def OnUpdate(self):
lastTime = max(0, self.endTime - time.clock())
if 0 == lastTime:
self.Close()
self.eventTimeOver()
else:
return

def OnPressExitKey(self):
self.Close()
return TRUE
Am bagat asta in uiscript :
Si astea in root :
Si am facut tutorialul de mai sus pentru game.py
De acolo vine problema...nu inlocui uimessenger, ci compara-le si adauga ceea ce lipseste. Inlocuie peste tot(inclusiv in fisierele adaugate din resursa) locale cu localeInfo, si se va rezolva.
Pentru acest mesaj, [RaffaeL] for the post:
darkallience3
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
darkallience3
Nivel 6

Nivel 6
Mesaje: 952
Membru din: 17 Dec 2013, 15:03
Server: Metin2Andromeda
Regat: Jinno
Aprecieri: 294  
Mulţumiri: 183  
Medalii

[RaffaeL] scrie: ↑06 Feb 2020, 19:15
darkallience3 scrie: ↑06 Feb 2020, 19:08
[RaffaeL] scrie: ↑06 Feb 2020, 18:56 Ok. Raspunde-mi te rog la o intrebare: ai adaugat ceea ce lipseste in uimessenger.py(din fisierul resursei in fisierul clientului tau) sau le-ai inlocuit pur si simplu?
intra game.py si bagi astea 2 :

import uiPopup
import time

ATENTIE !!!!!
sa nu fie de bagate deja iar voi sa le bagati inca o data !
__________________________________________________________________________

cauta in game.py def __ServerCommand_Build(self):

si bagi sub el asta:

"spop" : self.__ShowPopup,

ar trebuie sa arate cam asa :

def __ServerCommand_Build(self):
serverCommandList={
"ConsoleEnable" : self.__Console_Enable,
"DayMode" : self.__DayMode_Update,
"PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
"CloseRestartWindow" : self.__RestartDialog_Close,
"OpenPrivateShop" : self.__PrivateShop_Open,
"PartyHealReady" : self.PartyHealReady,
"ShowMeSafeboxPassword" : self.AskSafeboxPassword,
"CloseSafebox" : self.CommandCloseSafebox,
"spop" : self.__ShowPopup,

_________________________________________________________________________________

te duci jos de tot in game.py si bagi asta :

def __ShowPopup(self, arg):
self.pop = uiPopup.PopupMsg()
data = arg.split("|")
self.pop.SetType(int(data[0]))
self.pop.SetMsg(data[1])
self.pop.Show()

class WaitingDialog(ui.ScriptWindow):

def __init__(self):
ui.ScriptWindow.__init__(self)
self.__LoadDialog()
self.eventTimeOver = lambda *arg: None
self.eventExit = lambda *arg: None

def __del__(self):
ui.ScriptWindow.__del__(self)

def __LoadDialog(self):
try:
PythonScriptLoader = ui.PythonScriptLoader()
PythonScriptLoader.LoadScriptFile(self, "UIScript/WarteSchleife.py")

except:
import exception
exception.Abort("WaitingDialog.LoadDialog.BindObject")

def Open(self, waitTime):
curTime = time.clock()
self.endTime = curTime + waitTime

self.Show()

def Close(self):
self.Hide()

def Destroy(self):
self.Hide()

def SAFE_SetTimeOverEvent(self, event):
self.eventTimeOver = ui.__mem_func__(event)

def SAFE_SetExitEvent(self, event):
self.eventExit = ui.__mem_func__(event)

def OnUpdate(self):
lastTime = max(0, self.endTime - time.clock())
if 0 == lastTime:
self.Close()
self.eventTimeOver()
else:
return

def OnPressExitKey(self):
self.Close()
return TRUE
Am bagat asta in uiscript :
Si astea in root :
Si am facut tutorialul de mai sus pentru game.py
De acolo vine problema...nu inlocui uimessenger, ci compara-le si adauga ceea ce lipseste. Inlocuie peste tot(inclusiv in fisierele adaugate din resursa) locale cu localeInfo, si se va rezolva.
Rezolvat T/C!
Download (bagati in root) : https://www2.zippyshare.com/v/AEILdFZT/file.html
Tutorial : https://www2.zippyshare.com/v/p2Qh2dEy/file.html
Afișează semnătura
Avatar utilizator
Ley
Nivel 9

Nivel 9
Mesaje: 1934
Membru din: 09 Feb 2017, 22:30
Server: Colossus2
Regat: Jinno
Aprecieri: 221  
Mulţumiri: 1338  
Medalii

Problemă rezolvată.
Imagine
Afișează semnătura
Închis
Răspunsuri
19
Vizualizări
2598
Răspunsuri
3
Vizualizări
184
Răspunsuri
1
Vizualizări
174

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Google [Bot] și 24 vizitatori