Compartilhe
Ir em baixo
avatar
MEMBRO

MEMBRO
Mensagens : 234
Data de inscrição : 19/03/2017
Idade : 16
Localização : România
Ver perfil do usuáriohttp://blowmice.me

Re: 1.398 def sendProfile (Solved)

em Ter Ago 29, 2017 12:34 pm
or example? I'm not understand
avatar
MEMBRO

MEMBRO
Mensagens : 32
Data de inscrição : 06/07/2017
Localização : %null%
Ver perfil do usuário

Re: 1.398 def sendProfile (Solved)

em Ter Ago 29, 2017 4:52 pm
AdrianOficial escreveu:- Time: 29/08/2017 - 16:37:35
- Jogador: Adrian
- Erro de Comando: 
Traceback (most recent call last):
  File "D:\Fisiere importante\NeonMice Source\Python\Commands.py", line 668, in parseCommand
    this.client.sendProfile(playerName)
  File "D:\Fisiere importante\NeonMice Source\Source.py", line 1633, in sendProfile
    packet = ByteArray().writeUTF(player.playerName).writeInt(player.playerAvatar).writeInt(str(player.regDate)[:10]).writeByte({1:1, 2:1, 3:13, 4:13, 5:11, 6:11, 7:5, 8:5 ,9:10, 10:10, 11:10}[player.privLevel]).writeByte(player.gender).writeUTF(player.tribeName).writeUTF(player.marriage)
AttributeError: TFMClient instance has no attribute 'playerName'




pls help? Smile

try replace playerName with Username bro
avatar
MEMBRO

MEMBRO
Mensagens : 234
Data de inscrição : 19/03/2017
Idade : 16
Localização : România
Ver perfil do usuáriohttp://blowmice.me

Re: 1.398 def sendProfile (Solved)

em Qua Ago 30, 2017 2:22 am
- Time: 30/08/2017 - 08:21:27
- Jogador: Adrian
- Erro de Comando: 
Traceback (most recent call last):
  File "D:\Fisiere importante\NeonMice Source\Python\Commands.py", line 668, in parseCommand
    this.client.sendProfile(playerName)
  File "D:\Fisiere importante\NeonMice Source\Source.py", line 1624, in sendProfile
    packet = ByteArray().writeUTF(player.Username).writeInt(player.playerAvatar).writeInt(str(player.regDate)[:10]).writeByte({1:1, 2:1, 3:13, 4:13, 5:11, 6:11, 7:5, 8:5 ,9:10, 10:10}[player.privLevel]).writeByte(player.gender).writeUTF(player.tribeName).writeUTF(player.marriage)
AttributeError: TFMClient instance has no attribute 'Username'

Sad
avatar
MEMBRO

MEMBRO
Mensagens : 237
Data de inscrição : 04/06/2017
Idade : 13
Localização : Favela Dos Jogos Falecidos ;(
Ver perfil do usuário

Re: 1.398 def sendProfile (Solved)

em Qua Ago 30, 2017 11:29 am
AdrianOficial escreveu:English plz?
Change "player.Username" to "player.playerName" and test :v
MEMBRO

MEMBRO
Mensagens : 1
Data de inscrição : 12/09/2017
Ver perfil do usuário

Codigo correto!

em Qui Set 14, 2017 11:44 pm
Código:
def sendProfile(this, playerName):
        player = this.server.players.get(playerName)
        p = ByteArray()
        if player != None and not player.isGuest:              
            packet = ByteArray().writeUTF(player.playerName).writeInt(player.playerAvatar).writeInt(str(player.regDate)[:10]).writeByte({1:1, 2:1, 3:13, 4:13, 5:11, 6:11, 7:5, 8:5 ,9:10, 10:10, 11:10}[player.privLevel]).writeByte(player.gender).writeUTF(player.tribeName).writeUTF(player.marriage)
            for stat in [player.shamanSaves, player.shamanCheeses, player.firstCount, player.cheeseCount, player.hardModeSaves, player.bootcampCount, player.divineModeSaves]:
                packet.writeInt(stat)
            packet.writeShort(player.titleNumber).writeShort(len(player.titleList))
            for title in player.titleList:
                packet.writeShort(int(title - title % 1))
                packet.writeByte(int(round(title % 1 * 10)))
 
            packet.writeUTF(player.playerLook + ';' + player.mouseColor)          
            packet.writeShort(player.shamanLevel)          
            packet.writeShort(len(player.shopBadges) * 2)
            badges = map(int, player.shopBadges)
            for badge in badges:
                p.writeUnsignedByte(int(badge))
                p.writeByte(int(badges.count(badge)))
              
                if badge in badges:
                    packet.writeUnsignedByte(badge).writeByte(player.racingStats[0] / 1500 if badge == 124 else (player.racingStats[1] / 10000 if badge == 125 else (player.racingStats[2] / 10000 if badge == 127 else (player.racingStats[3] / 10000 if badge == 126 else (player.survivorStats[0] / 1000 if badge == 120 else (player.survivorStats[1] / 800 if badge == 121 else (player.survivorStats[2] / 20000 if badge == 122 else (player.survivorStats[3] / 10000 if badge == 123 else 0))))))))
                    badges.remove(int(badge))
 
            for badge in badges:
                packet.writeUnsignedByte(badge).writeByte(player.racingStats[0] / 1500 if badge == 124 else (player.racingStats[1] / 10000 if badge == 125 else (player.racingStats[2] / 10000 if badge == 127 else (player.racingStats[3] / 10000 if badge == 126 else (player.survivorStats[0] / 1000 if badge == 120 else (player.survivorStats[1] / 800 if badge == 121 else (player.survivorStats[2] / 20000 if badge == 122 else (player.survivorStats[3] / 10000 if badge == 123 else 0))))))))
 
            stats = [[30, player.racingStats[0], 1500, 124], [31, player.racingStats[1], 10000, 125], [33, player.racingStats[2], 10000, 127], [32, player.racingStats[3], 10000, 126], [26, player.survivorStats[0], 1000, 120], [27, player.survivorStats[1], 800, 121], [28, player.survivorStats[2], 20000, 122], [29, player.survivorStats[3], 10000, 123]]
            packet.writeByte(len(stats))
            for stat in stats:
                packet.writeByte(stat[0]).writeInt(stat[1]).writeInt(stat[2]).writeByte(stat[3])
 
            shamanBadges = range(1, 31)        
            packet.writeUnsignedByte(player.equipedShamanBadge).writeUnsignedByte(len(shamanBadges))          
            for shamanBadge in shamanBadges:
                packet.writeUnsignedByte(shamanBadge)
            count = 0
            for c in player.aventurePoints.values():
                count += c        
            packet.writeByte(1).writeInt(count)            
            this.sendPacket(Identifiers.send.Profile, packet.toByteArray())
Conteúdo patrocinado

Re: 1.398 def sendProfile (Solved)

Voltar ao Topo
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum