Problema State Off Channele

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

Mister Just4Metin
Mesaje: 619
Membru din: 28 Iun 2015, 16:07
Server: Draco
Regat: Shinsoo
Aprecieri: 127  
Mulţumiri: 168  
 Contact:
Medalii

*Problemă/Întrebare: Se conecteaza pe server fara probleme dar arata ch offline
Tipologie server: -
*Resursă folosită: -
*ServerFiles utilizat: 2089m
*Syserr: -
Poză: -
*Detalii suplimentare:

asta e serverinfo.py al meu si porturile corespund toate cu CONFIG-urile din servere inclusiv auth

import os
import app
import locale
import debugInfo

CHINA_PORT = 50000

def BuildServerList(orderList):
retMarkAddrDict = {}
retAuthAddrDict = {}
retRegion0 = {}

ridx = 1
for region, auth, mark, channels in orderList:
cidx = 1
channelDict = {}
for channel in channels:
key = ridx * 10 + cidx
channel['key'] = key
channelDict[cidx] = channel
cidx += 1

region['channel'] = channelDict

retRegion0[ridx] = region
retAuthAddrDict[ridx] = auth
retMarkAddrDict[ridx*10] = mark
ridx += 1

return retRegion0, retAuthAddrDict, retMarkAddrDict
if locale.IsEUROPE():
STATE_NONE = '...'

STATE_DICT = {
0 : '....',
1 : 'NORM',
2 : 'BUSY',
3 : 'FULL',
}

CHANNELS1 = [
{'name':'CH1','ip':'192.168.1.100','tcp_port':13001,'udp_port':13001,'state':STATE_NONE,},
{'name':'CH2','ip':'192.168.1.100','tcp_port':13002,'udp_port':13002,'state':STATE_NONE,},
{'name':'CH3','ip':'192.168.1.100','tcp_port':13003,'udp_port':13003,'state':STATE_NONE,},
{'name':'CH4','ip':'192.168.1.100','tcp_port':13004,'udp_port':13004,'state':STATE_NONE,},
]
MARK1 = { 'ip':'192.168.1.100', 'tcp_port' : 13001, 'mark' : '120.tga', 'symbol_path' : '120', }
AUTH1 = { 'ip':'192.168.1.100', 'port': 11002, }
NAME1 = { 'name' : 'Server1'}

REGION0_ORDER_LIST = [
(NAME1, AUTH1, MARK1, CHANNELS1),
]
NEW_REGION0, NEW_REGION0_AUTH_SERVER_DICT, NEW_MARKADDR_DICT = BuildServerList(REGION0_ORDER_LIST)

NEW_REGION_NAME_DICT = {0 : 'germany',}
NEW_REGION_AUTH_SERVER_DICT = {0 : NEW_REGION0_AUTH_SERVER_DICT,}
NEW_REGION_DICT = {0 : NEW_REGION0,}

MARKADDR_DICT = NEW_MARKADDR_DICT
REGION_DICT = NEW_REGION_DICT
REGION_NAME_DICT = NEW_REGION_NAME_DICT
REGION_AUTH_SERVER_DICT = NEW_REGION_AUTH_SERVER_DICT

TESTADDR = { 'ip':'192.168.1.100', 'tcp_port' : 50000, 'udp_port' : 50000, }
Avatar utilizator
sanducatalin1
Mister Just4Metin

Mister Just4Metin
Mesaje: 619
Membru din: 28 Iun 2015, 16:07
Server: Draco
Regat: Shinsoo
Aprecieri: 127  
Mulţumiri: 168  
 Contact:
Medalii

Cineva?

[ Postat de pe iPhone ] Imagine
Avatar utilizator
Okami
Deţinător Server

Deţinător Server
Mesaje: 1856
Membru din: 01 Ian 2015, 05:40
Server: Old Metin2
Regat: Jinno
Aprecieri: 614  
Mulţumiri: 107  
Discord: Copiază ID
 Contact:
Medalii

încearcă așa
fă o copie la al tău întâi

Cod: Selectaţi tot

import os
import app
import locale
import debugInfo

def BuildServerList(orderList):
	retMarkAddrDict = {}
	retAuthAddrDict = {}
	retRegion0 = {}

	ridx = 1
	for region, auth, mark, channels in orderList:
		cidx = 1
		channelDict = {}
		for channel in channels:
			key = ridx * 10 + cidx
			channel['key'] = key
			channelDict[cidx] = channel
			cidx += 1

		region['channel'] = channelDict

		retRegion0[ridx] = region
		retAuthAddrDict[ridx] = auth
		retMarkAddrDict[ridx*10] = mark
		ridx += 1

	return retRegion0, retAuthAddrDict, retMarkAddrDict
if locale.IsEUROPE():
	STATE_NONE = 'OFFLINE'

	STATE_DICT = {
		0 : 'MAINTENANCE',
		1 : 'NORMAL',
		2 : 'BUSY',
		3 : 'FULL',
	}

	CHANNELS1 = [
		{'name':'CH1','ip':'192.168.1.100','tcp_port':13001,'udp_port':13001,'state':STATE_NONE,},
		{'name':'CH2','ip':'192.168.1.100','tcp_port':13002,'udp_port':13002,'state':STATE_NONE,},
		{'name':'CH3','ip':'192.168.1.100','tcp_port':13003,'udp_port':13003,'state':STATE_NONE,},
		{'name':'CH4','ip':'192.168.1.100','tcp_port':13004,'udp_port':13004,'state':STATE_NONE,},		
	]
	MARK1 = { 'ip' : '192.168.1.100', 'tcp_port' : 13001, 'mark' : '10.tga', 'symbol_path' : '10', }
	AUTH1 = { 'ip' : '192.168.1.100', 'port' : 11002, }
	NAME1 = { 'name' : 'Server I'}
	REGION0_ORDER_LIST = [
		(NAME1, AUTH1, MARK1, CHANNELS1),
	]
	NEW_REGION0, NEW_REGION0_AUTH_SERVER_DICT, NEW_MARKADDR_DICT = BuildServerList(REGION0_ORDER_LIST)
	# RESULT
	NEW_REGION_NAME_DICT = {0 : 'GERMANY',}
	NEW_REGION_AUTH_SERVER_DICT = {0 : NEW_REGION0_AUTH_SERVER_DICT,}
	NEW_REGION_DICT = {0 : NEW_REGION0,}

	MARKADDR_DICT = NEW_MARKADDR_DICT
	REGION_DICT = NEW_REGION_DICT
	REGION_NAME_DICT = NEW_REGION_NAME_DICT
	REGION_AUTH_SERVER_DICT = NEW_REGION_AUTH_SERVER_DICT

	TESTADDR = { 'ip' : '192.168.1.100', 'tcp_port' : 50000, 'udp_port' : 50000, }
Afișează semnătura
Închis
Răspunsuri
12
Vizualizări
1001
Răspunsuri
2
Vizualizări
186

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

  • Informaţie