04.05.2012, 15:02
when i start my servar and join the game and when i alt+tab i see servar close(crash) i think its maybe of this code over here so basicly i wonna player to autologin if IP is same from db if code wrong please can someone help me please
becose wichout of him serva didnt crash and crash info
pawn Код:
public OnPlayerConnect(playerid)
{
TogglePlayerClock(playerid, 1);
new login[200];
format(login,sizeof(login),"SELECT `IP` FROM `playerdata` WHERE `username` = '%s' LIMIT 1",PlayerName(playerid));
mysql_query(login);
mysql_store_result();
new rows = mysql_num_rows();
if(!rows)
{
new rstring[256];
format(rstring,256,""RED"You are not register "WHITE"%s "RED"please enter your password",PlayerName(playerid));
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Register",rstring,"Continue","Exit");
}
if(rows == 1)
{
new IP[2][16];
mysql_fetch_field_row(IP[0],"IP");
GetPlayerIp(playerid,IP[1], 16);
if(strlen(IP[0]) != 0 && !strcmp(IP[0], IP[1], true))
{
load_player_data(playerid);
}
else if(!strlen(IP[0]) || strcmp(IP[0], IP[1], true))
{
new rstring[256];
format(rstring,256,""WHITE"Welcome "GREEN"%s"WHITE" please type in password",PlayerName(playerid));
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",rstring,"Continue","Exit");
Class[playerid] = 0;
}
}
//mysql_free_result();
return true;
}
/
Quote:
-------------------------- SA-MP Server: 0.3d Exception At Address: 0x00239AB1 Registers: EAX: 0x000001D8 EBX: 0x016A1350 ECX: 0x00000000 EDX: 0x003BFD28 ESI: 0x01457BE0 EDI: 0x01457BE0 EBP: 0x0012E5A4 ESP: 0x0012E57C EFLAGS: 0x00010286 Stack: +0000: 0x92745DC2 0x0012E5AC 0x016A1350 0x003BFD28 +0010: 0x72AB72AA 0x00000000 0x00000000 0x0012E608 +0020: 0x0023A58D 0x00000000 0x0012E614 0x002367E3 +0030: 0x0023A46B 0x00005049 0x0012E614 0x002367BF +0040: 0x0012E5E0 0x00000002 0x0000000F 0x92745E72 +0050: 0x00000001 0x0012E5AC 0x01EAFC20 0x0012F180 +0060: 0x0012E5AC 0xFFFFFFFF 0x00005049 0x00238E7F +0070: 0x0023D230 0x00000001 0x00000002 0x0000000F +0080: 0x92745E72 0x003BFD28 0x00000000 0x0012F180 +0090: 0x0023A6E0 0x00000000 0x016A9FE0 0x004010B6 +00A0: 0x01457BE0 0x0172B620 0x016AD7FC 0x00402B63 +00B0: 0x01457BE0 0x00000031 0x0012E64C 0x0172B620 +00C0: 0x0012EAE8 0x00000000 0x0172B9F8 0x01457BE0 +00D0: 0x0007DE3C 0x0007DE34 0x0007DE24 0x0007E1F0 +00E0: 0x0007A294 0x0007E1E0 0x0007A294 0x016A1350 +00F0: 0x016AD7FC 0x00000000 0x016A0020 0x0000C4AC +0100: 0x004718AE 0x01457BE0 0x0012EAD8 0x00000030 +0110: 0x00470064 0x65727453 0x72656D61 0x506E4F5F +0120: 0x6579616C 0x6E6F4372 0x7463656E 0x00471600 +0130: 0x01457BE0 0x01457BE0 0x016A1350 0x00000000 |