10.05.2012, 06:51
My server is always crashing in the part where i login & in the part where i automatic login
I am using strcmp wrong? in automatic login i check if ip match to database
here is the code
/login
Automatic Login (Base in Seven_of_Nine tutorial (Y_INI))
and i also get crashinfo after the server crash
I am using strcmp wrong? in automatic login i check if ip match to database
here is the code
/login
Код:
if(!strcmp(params, pData[playerid][Pass], true)) { pData[playerid][Login] = 1; SetPlayerName(playerid, pData[playerid][Name]); SetPlayerScore(playerid, pData[playerid][Score]); GivePlayerMoney(playerid, pData[playerid][Cash]); SendClientMessage(playerid, COLOR_GREEN, "You've successfully login!"); format(str, sizeof(str), "You've successfully login\nAdmin: %d\nVIP: %d\nScore: %d\n$%i\nKills: %d\nDeaths: %d", pData[playerid][Admin], pData[playerid][VIP], pData[playerid][Score], pData[playerid][Cash], pData[playerid][Kills], pData[playerid][Deaths]); ShowPlayerDialog(playerid, SUCCESSFULLOGIN, DIALOG_STYLE_MSGBOX, "Successfully Login:", str, "OK", ""); }
Код:
new str[128], ip[16]; GetPlayerIp(playerid, ip, sizeof(ip)); if(!strcmp(ip, pData[playerid][IP], true)) { INI_ParseFile(DataPath(playerid), "DataBase_%s", .bExtra = true, .extra = playerid); pData[playerid][Login] = 1; SetPlayerName(playerid, pData[playerid][Name]); SetPlayerScore(playerid, pData[playerid][Score]); GivePlayerMoney(playerid, pData[playerid][Cash]); SendClientMessage(playerid, COLOR_GREEN, "You've automaticlly login!"); format(str, sizeof(str), "You've automaticlly login\nAdmin: %d\nVIP: %d\nScore: %d\n$%i\nKills: %d\nDeaths: %d", pData[playerid][Admin], pData[playerid][VIP], pData[playerid][Score], pData[playerid][Cash], pData[playerid][Kills], pData[playerid][Deaths]); ShowPlayerDialog(playerid, SUCCESSFULLOGIN, DIALOG_STYLE_MSGBOX, "Successfully Login:", str, "OK", ""); return 1; }
Код:
-------------------------- SA-MP Server: 0.3d Exception At Address: 0x004684C4 Registers: EAX: 0x00000000 EBX: 0x019EE654 ECX: 0x00000000 EDX: 0x00000000 ESI: 0x00000000 EDI: 0x00000000 EBP: 0x0012E620 ESP: 0x0012E4C0 EFLAGS: 0x00010246 Stack: +0000: 0x00474D32 0x00000000 0x00000000 0x019EE654 +0010: 0x01045568 0x00492028 0x003F0000 0x010455D8 +0020: 0x00000000 0x0012E5B8 0x003F0178 0x0012E5B8 +0030: 0x7C910E91 0x003F0608 0x7C91056D 0x00000000 +0040: 0x010455E0 0x018810EC 0x00000000 0x004AD350 +0050: 0x010455D8 0x003F0178 0x003F68A0 0x010455E0 +0060: 0x0048DA14 0x00000014 0x0048DFE5 0x003F0178 +0070: 0x0048DFDB 0x01047118 0x00000000 0x00000000 +0080: 0xFFFFFFFF 0x0012E534 0x004AD320 0x0012F1B8 +0090: 0x00492028 0x01047120 0x00001008 0x0048DFDB +00A0: 0x00404F6C 0x004D64B0 0x019EE0F0 0x000000C2 +00B0: 0x0012E668 0x00000000 0x000000C1 0x00000118 +00C0: 0x003F0000 0x00405832 0x004D64B0 0x00000000 +00D0: 0x00000000 0x00000000 0x00000FA0 0x0049A85B +00E0: 0x0049A863 0x004E6B60 0x00000090 0x7C90D592 +00F0: 0x7C809BBB 0x00000000 0x00000004 0x004946C8 +0100: 0x0049A891 0x003F1FC4 0x00494772 0x00000004 +0110: 0x0049478F 0x00000000 0x004D64B0 0x018810EC +0120: 0x00000000 0x0012E5D4 0x00492028 0x0012E638 +0130: 0x00492028 0x004AD340 0xFFFFFFFF 0x0049478F