[13:14:23] [debug] Run time error 4: "Array index out of bounds" [13:14:23] [debug] AMX backtrace: [13:14:23] [debug] #0 000024b4 in public OnPlayerWeaponShot (playerid=3, weaponid=24, hittype=1, hitid=65535, Float:fX=0.05202, Float:fY=0.05553, Float:fZ=0.11593) at D:\Game\Samp\pawno\include\BustAim.inc:322
[14:39:08] [debug] Run time error 4: "Array index out of bounds" [14:39:08] [debug] AMX backtrace: [14:39:08] [debug] #0 00114c8c in public cmd_warn (playerid=5, params[]=@01a8149c "39 yes?") at D:\Game\Samp\gamemodes\GGW.pwn:7899 [14:39:08] [debug] #1 native CallLocalFunction () from samp03svr [14:39:08] [debug] #2 00073208 in public OnPlayerCommandText (playerid=5, cmdtext[]=@01a81464 "/warn 39 yes?") at D:\Game\Samp\pawno\include\zcmd.inc:112
CMD:warn(playerid, params[]) { if(pInfo[playerid][pLevel] < 1 )return ShowMessage(playerid, COLOR_RED, 1); new id,reason[128]; if(sscanf(params, "us[128]", id,reason)) return SCM(playerid, COLOR_YELLOW, "[SYSTEM] : /warn <Player ID/Part of Name> <Reason>"); if(pInfo[playerid][pLevel] < pInfo[id][pLevel]) return ShowMessage(playerid, COLOR_RED, 6); if(!IsPlayerConnected(id) || id == playerid || id == INVALID_PLAYER_ID)return ShowMessage(playerid,COLOR_RED,3); switch(pInfo[id][Warnings]) { case 0,1: { format(Jstring,sizeof(Jstring),"Admin '%s' has given '%s' a Warning | Reason: %s |Warnings: %d/3|",GetName(playerid),GetName(id),reason,pInfo[id][Warnings]); SCMToAll(COLOR_RED,Jstring); GameTextForPlayer(id, "~n~~n~~n~~n~~n~~n~~r~~h~~h~You are Warned!", 3000, 3 ); PlayerPlaySound(id,17802,0.0,0.0,0.0); } case 2: { format(Jstring,sizeof(Jstring),"Admin '%s' has kicked '%s' for %s | Warnings: %d/3 |",GetName(playerid),GetName(id),reason,pInfo[id][Warnings]); SCMToAll(COLOR_RED,Jstring); SetTimerEx("KickPlayer",200,false,"d", id); } } pInfo[id][Warnings]++; return 1; }
[15:36:22] [debug] Run time error 4: "Array index out of bounds" [15:36:22] [debug] AMX backtrace: [15:36:22] [debug] #0 00025ad4 in AddRejectedHit (playerid=65535, damagedid=5, reason=19, weapon=49, i1=1111883777, i2=0, i3=0) at D:\Game\Samp\pawno\include\weapon-config.inc:5308 [15:36:22] [debug] #1 00015ecc in public OnPlayerTakeDamage (playerid=5, issuerid=65535, Float:amount=49.50000, weaponid=49, bodypart=3) at D:\Game\Samp\pawno\include\weapon-config.inc:3373 [15:36:29] [debug] Run time error 4: "Array index out of bounds" [15:36:29] [debug] AMX backtrace: [15:36:29] [debug] #0 00025ad4 in AddRejectedHit (playerid=65535, damagedid=5, reason=19, weapon=49, i1=1111883777, i2=0, i3=0) at D:\Game\Samp\pawno\include\weapon-config.inc:5308 [15:36:29] [debug] #1 00015ecc in public OnPlayerTakeDamage (playerid=5, issuerid=65535, Float:amount=49.50000, weaponid=49, bodypart=3) at D:\Game\Samp\pawno\include\weapon-config.inc:3373 [15:36:39] [connection] incoming connection: 150.129.198.123:23519 id: 61 [15:36:40] [join] Bawa has joined the server (61:150.129.198.123) [15:36:53] [debug] Run time error 4: "Array index out of bounds" [15:36:53] [debug] AMX backtrace: [15:36:53] [debug] #0 00025ad4 in AddRejectedHit (playerid=65535, damagedid=5, reason=19, weapon=49, i1=1111883777, i2=0, i3=0) at D:\Game\Samp\pawno\include\weapon-config.inc:5308 [15:36:53] [debug] #1 00015ecc in public OnPlayerTakeDamage (playerid=5, issuerid=65535, Float:amount=49.50000, weaponid=49, bodypart=3) at D:\Game\Samp\pawno\include\weapon-config.inc:3373
I think those includes are clean and the problem come from your own code. You'll need to show step by step, each errors and the code associate. More detailled and clear your explains are, more we can help you, I guess ;p
|
if(pInfo[playerid][pLevel] < pInfo[id][pLevel]) return ShowMessage(playerid, COLOR_RED, 6);
if(!IsPlayerConnected(id) || id == playerid || id == INVALID_PLAYER_ID)return ShowMessage(playerid,COLOR_RED,3);
pawn Код:
|
You should check if the player is valid (connected) before treating the code. I'm talking about every callback/commands related to the players like Misiur said.
Do you have any problems left? |