- Vsyakot
MEMBRO - Mensagens : 52
Data de inscrição : 07/06/2017
[AJUDA] Help me please bug
Dom Jan 07, 2018 11:09 am
- Vsyakot
MEMBRO - Mensagens : 52
Data de inscrição : 07/06/2017
Re: [AJUDA] Help me please bug
Dom Jan 07, 2018 11:12 am
Help me please, bug!
- Whitesound
MEMBRO - Mensagens : 38
Data de inscrição : 07/11/2016
Idade : 22
Localização : Hell
Re: [AJUDA] Help me please bug
Dom Jan 07, 2018 3:51 pm
player is not part of tribe
- Vsyakot
MEMBRO - Mensagens : 52
Data de inscrição : 07/06/2017
Re: [AJUDA] Help me please bug
Seg Jan 08, 2018 7:22 pm
log:
How to fix, please
- Código:
- Time: 08/01/2018 - 13:07:12
- Player: Vesna
- Error:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\hotsmice\Core.py", line 324, in parseString
this.parsePackets.parsePacket(packetID, C, CC, ByteArray(packet[3:]))
File "C:\Users\Administrator\Desktop\hotsmice\modules\ParsePackets.py", line 1738, in parsePacket
this.client.tribulle.parseTribulleCode(code, packet)
File "C:\Users\Administrator\Desktop\hotsmice\modules\Tribulle.py", line 71, in parseTribulleCode
this.sendTribeList(packet)
File "C:\Users\Administrator\Desktop\hotsmice\modules\Tribulle.py", line 447, in sendTribeList
list.writeInt(int(info[0])).writeInt(this.server.getPlayerAvatar(playerName)).writeUTF(playerName).writeInt(int(tribeInfo[1])).writeInt(int(tribeInfo[2])).writeInt(int(info[2])).writeInt(Identifiers.tribulle.bytes.GAME_MODE).writeUTF("" if player == None else player.roomName).writeBool(player != None)
IndexError: list index out of range
- Código:
def sendTribeList(this, readPacket):
members = this.getTribeMembers(this.client.tribeCode)
p = ByteArray().writeInt(readPacket.readInt())
infos = {}
this.Cursor.execute("select Username, PlayerID, TribeInfo, LastOn from Users where Username in (%s)" %(this.client.TFMUtils.joinWithQuotes(members)))
r = this.Cursor.fetchall()
for rs in r:
infos[rs["Username"]] = [rs["PlayerID"], rs["TribeInfo"], rs["LastOn"]]
list = ByteArray()
count = 0
for playerName in members:
if not infos.has_key(playerName):
continue
info = infos[playerName]
tribeInfo = this.getPlayerTribeInfo(this.client.TFMUtils.parsePlayerName(playerName)).split("#")
player = this.server.players.get(playerName)
list.writeInt(int(info[0])).writeInt(this.server.getPlayerAvatar(playerName)).writeUTF(playerName).writeInt(int(tribeInfo[1])).writeInt(int(tribeInfo[2])).writeInt(int(info[2])).writeInt(Identifiers.tribulle.bytes.GAME_MODE).writeUTF("" if player == None else player.roomName).writeBool(player != None)
count += 1
this.sendPacket(Identifiers.tribulle.send.ET_ResultatMembresTribu, p.writeShort(count).writeBytes(list.toByteArray()).toByteArray())
How to fix, please
- Vsyakot
MEMBRO - Mensagens : 52
Data de inscrição : 07/06/2017
Re: [AJUDA] Help me please bug
Ter Jan 09, 2018 12:19 am
Yes.
Avatar:
Avatar:
- Código:
def getPlayerAvatar(this, playerName):
this.Cursor.execute("select Avatar from Users where Username = ?", [playerName])
rs = this.Cursor.fetchone()
if rs:
return rs["Avatar"]
return 0
- Código:
def getplayerAvatar1(this, playerName):
if playerName.startswith('*'):
return 0
else:
this.Cursor.execute('select avatar from Users where Username = ?', [playerName])
rrf = this.Cursor.fetchone()
if rrf is None:
return 0
if rrf[0] == 'None':
return 0
return int(rrf[0])
Permissões neste sub-fórum
Não podes responder a tópicos