[Duv] O que hб de errado? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Duv] O que hб de errado? (
/showthread.php?tid=127340)
[Duv] O que hб de errado? -
igorponce - 13.02.2010
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
SavePlayerConfig(playerid);
SavePlayerXml(playerid);
return 1;
}
SavePlayerXml(playerid);
public SavePlayerXml(playerid)
{
new FilePathX[256];
format(FilePath,sizeof(FilePath),"%s%s.xml",XmlPath,PlayerInfo[playerid][Name]);
new File: file2;
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "<PlayerInfo>\r\n <Player>\r\n <Name>%s</Name>\r\n <Kills>%d</Kills>\r\n <Deaths>%d</Deaths>\r\n <LastLocationZone>%s</LastLocationZone>\r\n <Money>%d</Money>\r\n <LastIp>%s</LastIp>\r\n <LocationInWorld>%s</LocationInWorld>\r\n </Player>\r\n</PlayerInfo>",
PlayerInfo[playerid][Name],
PlayerInfo[playerid][Kills],
PlayerInfo[playerid][Deaths],
PlayerInfo[playerid][LastLocationZone],
PlayerInfo[playerid][Money],
PlayerInfo[playerid][LastIp],
PlayerInfo[playerid][LocationInWorld]
);
file2 = fopen(FilePathX, io_write);
fwrite(file2, coordsstring);
fclose(file2);
return 1;
}
Crash Info:
Код:
--------------------------
Exception At Address: 0x77947DD2
Registers:
EAX: 0x00000024 EBX: 0x0000003C ECX: 0x004A4068 EDX: 0x00000000
ESI: 0x00000024 EDI: 0x00000020 EBP: 0x0012FBB4 ESP: 0x0012FBA0
EFLAGS: 0x00010212
Stack:
+0000: 0x01CEF53C 0x00000000 0x0012FBC8 0x01C40BF0
+0010: 0x00000000 0x0012FBF0 0x00473144 0x00000020
+0020: 0x004737DE 0x00000000 0x01CEF53C 0x00000000
+0030: 0x0000003C 0x00000FFF 0x0012FBC8 0x0012F7C4
+0040: 0x0012FDF8 0x004774CC 0x00490D48 0xFFFFFFFF
+0050: 0x00000000 0x0040531E 0x0000003C 0x00000000
+0060: 0x01CEF530 0x0012FC20 0x01C30344 0x0040575F
+0070: 0x00000001 0x01AA24B0 0x01AA24B0 0x000000FF
+0080: 0x01C3323C 0x004010B6 0x01AA24B0 0x01CEF53C
+0090: 0x01C33280 0x00402B63 0x01AA24B0 0x00000008
+00A0: 0x0012FC58 0x01CEF530 0x00000000 0x00000001
+00B0: 0x01B2EE60 0x00000001 0x00000000 0x000BC2B0
+00C0: 0x000BC2B0 0x000BCAE4 0x000B8AE8 0x000BCAC0
+00D0: 0x000B8AE8 0x01C30344 0x01C33280 0x00000000
+00E0: 0x01C30020 0x00002F3C 0x00451A3E 0x01AA24B0
+00F0: 0x0012FCB8 0x00000005 0x01AA24B0 0x00000000
+0100: 0x01AA24B0 0x00000001 0x028AC448 0x00000000
+0110: 0x00000001 0x00000000 0x00000000 0x0046616B
+0120: 0x00000000 0x00000005 0x76031C6B 0x01A31098
+0130: 0x01A36808 0x00000000 0x76031C6B 0x00448983
Ok, bem foi postado o codigo acima, o que a de errado?, Toda vez que eu saio do servidor, o servidor Crasha!
Estou desconfiado do SavePlayerXml(playerid) pois o SavePlayerConfig(playerid); esta exercendo sua funзгo corretamente!
=---------------------------------------------------
Duvida resolvida
tive que corrigir esta parte:
pawn Код:
format(FilePathX,sizeof(FilePathX),"%s%s.xml",XmlPath,PlayerInfo[playerid][Name]);
Re: [Duv] O que hб de errado? -
[NNFc]MinDs - 13.02.2010
Sempre verifique seus scripts, principalmente no comeзo..
pois um erro pode ser fatal