12.03.2014, 22:39
Code:
[23:57:24] 1 (ID:16): 154 [23:57:24] [debug] Server crashed while executing tolrp.amx [23:57:24] [debug] AMX backtrace: [23:57:24] [debug] #0 native mysql_query () [01d97cf0] from mysql.DLL [23:57:24] [debug] #1 000be70c in ?? (0x00000010) from tolrp.amx [23:57:24] [debug] #2 000c3c88 in public SSCANF_OnPlayerDisconnect (0x00000010, 0x00000002) from tolrp.amx [23:57:24] [debug] #3 native CallLocalFunction () [00472ad0] from samp-server.exe [23:57:24] [debug] #4 0000b494 in public Streamer_OnPlayerDisconnect (0x00000010, 0x00000002) from tolrp.amx [23:57:24] [debug] #5 native CallLocalFunction () [00472ad0] from samp-server.exe [23:57:24] [debug] #6 00002668 in public Itter_OnPlayerDisconnect (0x00000010, 0x00000002) from tolrp.amx [23:57:24] [debug] #7 00001c4c in public OnPlayerDisconnect (0x00000010, 0x00000002) from tolrp.amx [23:57:24] [debug] #8 native Kick () [0046f390] from samp-server.exe [23:57:24] [debug] #9 0023b0b4 in ?? (0x00000010, 0xe60000ff, 0x001e1588) from tolrp.amx [23:57:24] [debug] #10 001122d8 in public OnDialogResponse (0x00000010, 0x0000003b, 0x00000001, 0x00000000, 0x00810ae0) from tolrp.amx [23:57:24] [debug] Native backtrace: [23:57:24] [debug] #0 028b6a97 in ?? () from C:\Windows\system32\LIBMYSQL.dll [23:57:24] [debug] #1 028b6c67 in ?? () from C:\Windows\system32\LIBMYSQL.dll
Code:
stock savePlayerData(const playerid) { if(PlayerInfo[playerid][pStatus] >= 1 || PlayerInfo[playerid][pStatus] == -1) { new saveQuery[1536]; new TableID = PlayerInfo[playerid][pInternalID]; #if defined DEBUG print("[debug] savePlayerData Step 1"); #endif if(PlayerInfo[playerid][pStatus] == -1) PlayerInfo[playerid][pStatus] = 0; if(PlayerInfo[playerid][pCarModel] >= 1 && doesVehicleExist(PlayerInfo[playerid][pCarID])) { GetVehiclePos(PlayerInfo[playerid][pCarID], PlayerInfo[playerid][pCarPos][0], PlayerInfo[playerid][pCarPos][1], PlayerInfo[playerid][pCarPos][2]); GetVehicleZAngle(PlayerInfo[playerid][pCarID], PlayerInfo[playerid][pCarPos][3]); for(new i = 0; i < 13; i++) { PlayerInfo[playerid][pCarMods][i] = GetVehicleComponentInSlot(PlayerInfo[playerid][pCarID], i); } PlayerInfo[playerid][pCarFuel] = Fuel[PlayerInfo[playerid][pCarID]]; } if(PlayerInfo[playerid][vModel] >= 1 && doesVehicleExist(PlayerInfo[playerid][pVeh])) { GetVehiclePos(PlayerInfo[playerid][pVeh],PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]); GetVehicleZAngle(PlayerInfo[playerid][pVeh],PlayerInfo[playerid][vA]); for(new i = 0; i < 14; i++) { PlayerInfo[playerid][pVehMod][i] = GetVehicleComponentInSlot(PlayerInfo[playerid][pVeh], i); } PlayerInfo[playerid][vFuel] = Fuel[PlayerInfo[playerid][pVeh]]; } if(PlayerInfo[playerid][vvModel] >= 1 && doesVehicleExist(PlayerInfo[playerid][pVVeh])) { GetVehiclePos(PlayerInfo[playerid][pVVeh],PlayerInfo[playerid][vvX], PlayerInfo[playerid][vvY], PlayerInfo[playerid][vvZ]); GetVehicleZAngle(PlayerInfo[playerid][pVVeh],PlayerInfo[playerid][vvA]); for(new i = 0; i < 14; i++) { PlayerInfo[playerid][pVVehMod][i] = GetVehicleComponentInSlot(PlayerInfo[playerid][pVVeh], i); } PlayerInfo[playerid][vvFuel] = Fuel[PlayerInfo[playerid][pVVeh]]; } for(new i = 0; i < 13; i++) { SaveDodAmmo(playerid,i); } if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pEvent] == 0) { GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]); GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]); } //printf("Step 2 Pass"); // If they're not in an event and not spectating, current pos is saved. Otherwise, they'll be set back to the pos they last used /joinevent or /spec. if(PlayerInfo[playerid][pSpectating] == INVALID_PLAYER_ID && PlayerInfo[playerid][pEvent] == 0) { if(PlayerInfo[playerid][pTutorial] == 0) { GetPlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]); PlayerInfo[playerid][pInterior] = GetPlayerInterior(playerid); PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid); // If someone disconnects while spectating. } } format(saveQuery, sizeof(saveQuery), "UPDATE aacoutsername SET playerBanned = '%d', playerSeconds = '%d', playerSkin = '%d', playerBuySkin = '%d', playerHungry = '%d'", PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pSeconds], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pBuySkin], PlayerInfo[playerid][pHungry]); format(saveQuery, sizeof(saveQuery), "%s WHERE playerID = '%d'", saveQuery, TableID); printf("1 (ID:%d): %d",playerid,strlen(saveQuery)); mysql_query(saveQuery); print("1 Success"); format(saveQuery, sizeof(saveQuery), "UPDATE aacoutsername SET playerAccent = '%s', plaagjaowg = '%d', playerJob = '%d', playerWeapon0 = '%d', playerWeapon1 = '%d', playerWeapon2 = '%d', playerWeapon3 = '%d'", PlayerInfo[playerid][pAccent], PlayerInfo[playerid][pAdminLevel], PlayerInfo[playerid][pJob], PlayerInfo[playerid][pWeapons][0], PlayerInfo[playerid][pWeapons][1], PlayerInfo[playerid][pWeapons][2], PlayerInfo[playerid][pWeapons][3]); format(saveQuery, sizeof(saveQuery), "%s WHERE playerID = '%d'", saveQuery, TableID); printf("2 (ID:%d): %d",playerid,strlen(saveQuery)); mysql_query(saveQuery); print("2 Success");