20.02.2019, 23:47
Good day, I immediately apologize for my English.
The essence of the matter is this, when two players turn on, and after they enter the password, and the server confirms its correctness, for some reason the server is turned off.
My codes:
Answer CallBack:
After the player has entered the correct password, and pressed the button: 'Enter'
Answer LoginCallBack
Connecting: crashdetect:
I am using mysql version r39-6
The essence of the matter is this, when two players turn on, and after they enter the password, and the server confirms its correctness, for some reason the server is turned off.
My codes:
PHP Code:
GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME);
new query121[75+MAX_PLAYER_NAME+4];
format(query121, sizeof(query121), "SELECT `acc_id`,`pass`,`salt_pass` FROM `account` WHERE `nick`='%s'", PlayerInfo[playerid][pName]);
mysql_function_query(MysqlConnect, query121, true, "OnRegCheckCallBack","d",playerid);
PHP Code:
forward OnRegCheckCallBack(playerid);
public OnRegCheckCallBack(playerid)
{
new rows, fields;
cache_get_data(rows, fields,MysqlConnect);
if(rows)
{
PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "acc_id", MysqlConnect);
cache_get_field_content(0, "pass", PlayerInfo[playerid][pPassword], MysqlConnect, 33);
cache_get_field_content(0, "salt_pass", PlayerInfo[playerid][salt_pass], MysqlConnect, 11);
printf("ID: %d",PlayerInfo[playerid][pID]);
printf("Password: %s",PlayerInfo[playerid][pPassword]);
printf("salt_pass: %s",PlayerInfo[playerid][salt_pass]);
OnPlayerDialogD_REG_AUTOS(playerid,1);// authorization dialog
}
else OnPlayerDialogD_REG_AUTOS(playerid,2);// registration dialog
return 1;
}
PHP Code:
new query2[51+11+2];
format(query2, sizeof(query2), "SELECT * FROM `account` WHERE `acc_id`='%d'", PlayerInfo[playerid][pID]);
mysql_function_query(MysqlConnect, query2,true,"OnPlayerLoginCallBack","dd",PlayerInfo[playerid[pID],playerid);
PHP Code:
forward OnPlayerLoginCallBack(playermysqlid,playerid);
public OnPlayerLoginCallBack(playermysqlid,playerid)
{
if(playermysqlid != PlayerInfo[playerid][pID]) return 1;
if(playerid == INVALID_PLAYER_ID) return 1;
if(cache_get_row_count(MysqlConnect) > 0)
{
TogglePlayerSpectating(playerid, false);
PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "acc_id", MysqlConnect);
cache_get_field_content(0, "nick", PI[playerid][pName], MysqlConnect, MAX_PLAYER_NAME);
cache_get_field_content(0, "pass", PI[playerid][pPassword], MysqlConnect, 33);
cache_get_field_content(0, "salt_pass", PI[playerid][pass_salt], MysqlConnect, 11);
SpawnPlayer(playerid);
}
return 1;
}
PHP Code:
[02:38:34] [debug] Server crashed due to an unknown error
[02:38:34] [debug] Native backtrace:
[02:38:34] [debug] #0 00481ff3 in ?? () in samp-server-cr.exe
[02:38:34] [debug] Registers:
[02:38:34] [debug] EAX: 00000001 EBX: 00000000 ECX: 059d3bc8 EDX: 0101a8c0
[02:38:34] [debug] ESI: 059d3bc8 EDI: 059d3bc8 EBP: 0019fc4c ESP: 0019f818
[02:38:34] [debug] EIP: 00481ff3 EFLAGS: 00010206
[02:38:34] [debug] Stack:
[02:38:34] [debug] ESP+00000000: 00000001 0048a155 02ffe578 0249c7a0
[02:38:34] [debug] ESP+00000020: 05888168 0249c7a0 02490096 00000081
[02:38:34] [debug] ESP+00000040: 1a8faaca fffffffe 0019f88c 77e4b4e8
[02:38:34] [debug] ESP+00000060: 00000006 ffffffff 00000000 0048763b
[02:38:34] [debug] ESP+00000080: 00000000 004921f6 0019f9ac 00000001
[02:38:34] [debug] ESP+000000a0: 0019fb18 004965f8 004b1230 ffffffff
[02:38:34] [debug] ESP+000000c0: 30467b0a 43383645 e0e2d37d ece5e0e6
[02:38:34] [debug] ESP+000000e0: 30303030 2d50497d e5f0e4e0 467b20f1
[02:38:34] [debug] ESP+00000100: f620c20a f5ffebe5 e7e5e120 f1e0efee
[02:38:34] [debug] ESP+00000120: e8e4e5e2 7b20e5f2 0000002b 00000800
[02:38:34] [debug] ESP+00000140: 30467b2e 43383645 cf0a0a7d e5e2eef0
[02:38:34] [debug] ESP+00000160: e2e220fc 20e0e4ee f7feebea 20e820e0
[02:38:34] [debug] ESP+00000180: 4332337b 7d323344 eee2c227 0a0a27e4
[02:38:34] [debug] ESP+000001a0: 0047cd00 3443447b 7d373437 ece8edc2
[02:38:34] [debug] ESP+000001c0: 02956bb8 00000bf9 000017f2 00000000
[02:38:34] [debug] ESP+000001e0: e8edc27d e8ede0ec c20421e5 06e4eee2
[02:38:34] [debug] ESP+00000200: 60636361 54455320 6e6f6020 656e696c
[02:38:34] [debug] ESP+00000220: 60204552 64695f70 30273d60 02e10027
[02:38:34] [debug] ESP+00000240: 00000800 00000000 0019fa65 040f3b01
[02:38:34] [debug] ESP+00000260: 02956bb8 00000fca 00000005 00000000
[02:38:34] [debug] ESP+00000280: 00000000 00000000 00000000 00000000
[02:38:34] [debug] ESP+000002a0: 0019fad4 00000000 0046878a 00000044
[02:38:34] [debug] ESP+000002c0: 0019fb24 059d3bc8 059ec650 0048322e
[02:38:34] [debug] ESP+000002e0: 0019fb04 0000007e b368d696 00000000
[02:38:34] [debug] ESP+00000300: 68965f61 0019fb34 00000001 00000000
[02:38:34] [debug] ESP+00000320: 00000000 00000001 0019fc5c 689792ef
[02:38:34] [debug] ESP+00000340: 68979309 00000000 02e140c0 00000000
[02:38:34] [debug] ESP+00000360: 00000000 6d667a7e c000007a 0019fc50
[02:38:34] [debug] ESP+00000380: 77e57bdf 02e140c0 0019fc80 0019fbfc
[02:38:34] [debug] ESP+000003a0: 00000000 00000086 0067c0e8 00e140c0
[02:38:34] [debug] ESP+000003c0: 0019fc04 68965f61 0019fbf8 00000001
[02:38:34] [debug] ESP+000003e0: 02956388 77e4c6a9 6d667d02 00660000