AMX backtrace error
#1

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
Reply
#2

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?
Reply
#3

Fixed by myself thx for reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)