Some errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Some errors (
/showthread.php?tid=594506)
Some errors -
Nin9r - 19.11.2015
Hi!
These is my errors:
1.
Код:
[18:57:18] [debug] #0 000a7448 in public OnPlayerTakeDamage (playerid=12, issuerid=65535, Float:amount=0.27225, weaponid=37, bodypart=3) at D:\server\gamemodes\vortex.pwn:11155
[18:57:18] [debug] Run time error 4: "Array index out of bounds"
[18:57:18] [debug] Accessing element at index 65535 past array upper bound 999
Line 11155:
Код:
if(JoinedGunGame[issuerid] >= 2)
Entire code:
Код:
if(JoinedGunGame[issuerid] >= 2)
{
if(JoinedGunGame[playerid] == 2)
{
if(!IsPlayerInAnyVehicle(issuerid))
{
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
GetPlayerHealth(issuerid, shealth);
SetPlayerHealth(issuerid, shealth-5);
GetPlayerPos(issuerid, slx, sly, slz);
SetPlayerPos(issuerid, slx, sly, slz+5);
}
}
}
2. In mysql_log i receive this:
a.
Код:
[16:16:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
b.
Код:
[16:16:30] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0', playerFirstLogin = '0', playerAdminName = '', playerPrisonTime = '0', player' at line 1
Line:
Код:
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerWarning1 = '%s', playerWarning2 = '%s', playerWarning3 = '%s', playerHospitalized = '%d', playerFirstLogin = '%d', playerAdminName = '%s', playerPrisonTime = '%d', playerPrisonID = '%d', playerPhoneNumber = '%d' WHERE playerID = '%d'",
PlayerData[playerid][pDriveLicense], PlayerData[playerid][pFlyLic], PlayerData[playerid][pGunLic], PlayerData[playerid][pHospitalized], PlayerData[playerid][pFirstLogin], PlayerData[playerid][pCrimeReason],
PlayerData[playerid][pPrisonTime], PlayerData[playerid][pPrisonID], PlayerData[playerid][pPhoneNumber],PlayerData[playerid][pInternalID]);
mysql_tquery(handle,saveQuery);
c.
Код:
[12:49:32] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
[12:49:32] [WARNING] cache_get_row_count - no active cache
[12:49:32] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
Thank you!
Re: Some errors -
Nin9r - 24.11.2015
BUMP