AMX backtrace error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AMX backtrace error (
/showthread.php?tid=596481)
AMX backtrace error -
SilverStand - 18.12.2015
Help me to fix this code
Код:
forward MinigameUpdate();
public MinigameUpdate()
{
new objectid = Iter_Random(fallObject), Float:ObjectX, Float:ObjectY, Float:ObjectZ;
GetDynamicObjectPos(serverInfo[falloutGlass][objectid], ObjectX, ObjectY, ObjectZ );
SetTimerEx("SpeedUp", 500, 0, "ifff", objectid, ObjectX, ObjectY, ObjectZ);
MoveDynamicObject(serverInfo[falloutGlass][objectid], ObjectX, ObjectY, ObjectZ -5, 1 );
Iter_Remove(fallObject, objectid );
return 1;
}
This error show in the server_log
Код:
[23:07:19] [debug] AMX backtrace:
[23:07:19] [debug] #0 00175658 in public MinigameUpdate () from cnr.amx
[23:07:22] [debug] Run time error 4: "Array index out of bounds"
[23:07:22] [debug] Accessing element at negative index -1
Re: AMX backtrace error - Patrick - 18.12.2015
Pretty sure that objectid returns higher value than the MAXIMUM fallout object(s), mind showing us the code of how your fallout glass is constructed?
Re: AMX backtrace error -
SilverStand - 18.12.2015
Fixed by myself
thx for reply