18.12.2015, 15:26
Help me to fix this code
This error show in the server_log
Код:
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;
}
Код:
[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


thx for reply