eroare localegame.py

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
adrianadyy
Nivel 4

Nivel 4
Mesaje: 662
Membru din: 09 Ian 2017, 20:18
Server: Odisian2
Regat: Shinsoo
Aprecieri: 38  
Mulţumiri: 8  
 Contact:
Medalii

*Problemă: nus ce are localegame.py de imi da eroare cand pornesc clientul
Tipologie server(PvM / PvP):-
*Resursă folosită:trade duel v3
*ServerFiles utilizat:clean with martysama
*Syserr:
0719 16:53:25816 :: ============================================================================================================
0719 16:53:25816 :: Abort!!!!


0719 16:53:25848 ::
networkModule.py(line:208) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:26) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
uiTarget.py(line:12) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
localegame.py(line:176) <module>
localegame.py(line:47) LoadLocaleFile

networkModule.SetSelectCharacterPhase - <type 'exceptions.UnboundLocalError'>:local variable 'ac' referenced before assignment

0719 16:53:25848 :: ============================================================================================================
0719 16:53:25848 :: Abort!!!!

Poză:-
*Detalii suplimentare: pe ecran la selectarea caracterului mai apare mesajul beklenmeyen hata(eroare ne asteptata) locale/en/game.txt
EDIT: noua problema,am trecut de faza cu eroarea in ui.py
EDIT2:
localegame.py
import app
import constInfo
import serverInfo

class Game_Fatihbab34:
	__IS_TURKCE = "1"
	if __IS_TURKCE:
		__IS_TURKCE = TRUE
	
	if 12580>15477:
		print"is Updating..."

class Game_Test:
	print"--------------------------------------- GAME ~ PRINT"

__IS_TURKCE		= "TURKCE" == app.GetLocaleServiceName()
__IS_ENGLISH	= "ENGLISH" == app.GetLocaleServiceName()
__IS_EUROPE		= "EUROPE" == app.GetLocaleServiceName()		
__IS_CANADA		= "locale/ca" == app.GetLocalePath()

if __IS_CANADA:
	__IS_EUROPE = TRUE

def SNA(text):	
	def f(x):
		return text
	return f

def SA(text):
	def f(x):
		return text % x
	return f

def LoadLocaleFile(gelenDosya, kelime):

	funcDict = {"SA":SA, "SNA":SNA}

	yer = 1

	try:
		ac = pack_open(gelenDosya, "r").readlines()
	except IOError:
		import dbg
		dbg.LogBox("Beklenmeyen Hata(%(gelenDosya)s)" % locals())
		app.Abort()

	for i in ac:
		try:		
			tokens = i[:-1].split("\t")
			if len(tokens) == 2:
				kelime[tokens[0]] = tokens[1]		
			elif len(tokens) >= 3:
				type = tokens[2].strip()
				if type:
					kelime[tokens[0]] = funcDict[type](tokens[1])
				else:
					kelime[tokens[0]] = tokens[1]
			else:
				raise RuntimeError, "Belirsiz Token kodu tespit edildi!"

			yer += 1
		except:
			import dbg
			dbg.LogBox("%s: Bulunan Satır(%d): %s" % (gelenDosya, yer, i), "localegame[game.txt]")
			raise

def GetTimeModule(time): #app.GetGlobalTimeStamp()
    d, s = divmod(time, 60)
    ss, d = divmod(d, 60)
    return "%02d:%02d" % (d, s)

def GetTimeModuleEx(time):
    d, s2 = divmod(time, 10)
    ss2, d = divmod(d, 10)
    return "%d" % (s2)

def GetAuxiliaryWordType(text):

	textLength = len(text)

	if textLength > 1:

		singleWord = text[-1]

		if (singleWord >= '0' and singleWord <= '9') or\
			(singleWord >= 'a' and singleWord <= 'z') or\
			(singleWord >= 'A' and singleWord <= 'Z'):
			if not dictSingleWord.has_key(singleWord):
				return 1

		elif dictDoubleWord.has_key(text[-2:]):
			return 1

	return 0



def CutMoneyString(sourceText, startIndex, endIndex, insertingText, backText):

	sourceLength = len(sourceText)

	if sourceLength < startIndex:
		return backText

	text = sourceText[max(0, sourceLength-endIndex):sourceLength-startIndex]

	if not text:
		return backText

	if int(text) <= 0:
		return backText

	text = str(int(text))

	if backText:
		backText = " " + backText

	return text + insertingText + backText

def SecondToDHM(time):

	if time < 60:
		if IsARABIC():
			return "%.2f %s" % (time, SECOND)
		else:
			return "0" + MINUTE
		
	second = int(time % 60)
	minute = int((time / 60) % 60)
	hour = int((time / 60) / 60) % 24
	day = int(int((time / 60) / 60) / 24)

	text = ""

	if day > 0:
		text += str(day) + DAY
		text += " "

	if hour > 0:
		text += str(hour) + HOUR
		text += " "

	if minute > 0:
		text += str(minute) + MINUTE

	return text

def SecondToHM(time):

	if time < 60:
		if IsARABIC():
			return "%.2f %s" % (time, SECOND)
		else:
			return "0" + MINUTE

	second = int(time % 60)
	minute = int((time / 60) % 60)
	hour = int((time / 60) / 60)

	text = ""

	if hour > 0:
		text += str(hour) + HOUR
		if hour > 0:
			text += " "

	if minute > 0:
		text += str(minute) + MINUTE

	return text

LOGOM = "locale/turkey/fatihbab34/ingamesrc/test.mse"
LOCALE_FILE_NAME = "%s/game.txt" % app.GetLocalePath()
constInfo.IN_GAME_SHOP_ENABLE = 0

LoadLocaleFile(LOCALE_FILE_NAME, locals())
https://www.facebook.com/Metin2Odisian/
Pvm-pvp max lv 105
Deschiderea are loc pe data de 27/06/2020
site http://odisian2.com/
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

LoadLocaleFile(LOCALE_FILE_NAME, locals())-> schimba locals cu locatia fizica a fisierului locale_game.txt.
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
Închis
Eroare
Răspunsuri
2
Vizualizări
341
Răspunsuri
4
Vizualizări
412

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 168 vizitatori