Код команды test:
Код HTML:
CMD:test(playerid,params[])
{
for(new i; i < 51000; i++)
{
CreateDynamicObject(2587, float(random(2000)), float(random(2000)), float(random(2000)), 0.0, 0.0, 0.0);
printf("Object %d", CreateDynamicObject(2587, float(random(2000)), float(random(2000)), float(random(2000)), 0.0, 0.0, 0.0));
printf("Upperbound %d", Streamer_GetUpperBound(STREAMER_TYPE_OBJECT));
}
printf("FINAL OBJECT %d", CreateDynamicObject(2587, float(random(2000)), float(random(2000)), float(random(2000)), 0.0, 0.0, 0.0));
printf("FINAL BOUND%d", Streamer_GetUpperBound(STREAMER_TYPE_OBJECT));
return 1;
}
Лог:
Код HTML:
[17:44:11] Upperbound 49991
[17:44:11] Object 49992
[17:44:11] Upperbound 49993
[17:44:11] Object 49994
[17:44:11] Upperbound 49995
[17:44:11] Object 49996
[17:44:11] Upperbound 49997
[17:44:11] Object 49998
[17:44:11] Upperbound 49999
[17:44:11] [debug] Run time error 4: "Array index out of bounds"
[17:44:11] [debug] Attempted to read/write array element at index 50000 in array of size 50000
[17:44:11] [debug] AMX backtrace:
[17:44:11] [debug] #0 00040ee0 in CA_CreateDynamicObject (modelid=2587, Float:x=1574.00000, Float:y=1759.00000, Float:z=246.00000, Float:rx=0.00000, Float:ry=0.00000, Float:rz=0.00000, vw=-1, interior=-1, playerid=-1, Float:streamdistance=300.00000, Float:drawdistance=0.00000, areaid=-1, priority=0) at E:\Online\pawno\include\colandreas.inc:81
[17:44:11] [debug] #1 00053cac in public cmd_test (playerid=0, params[]=@001f2c90 "") at E:\Online\gamemodes\Untitled.pwn:105
[17:44:11] [debug] #2 native CallLocalFunction () from samp-server.exe
[17:44:11] [debug] #3 000412dc in public ac_OnPlayerCommandText (playerid=0, cmdtext[]=@001f2c78 "/test") at E:\Online\pawno\include\izcmd.inc:120
[17:44:11] [debug] #4 000258b4 in public OnPlayerCommandText (playerid=0, cmdtext[]=@001f2c78 "/test") at E:\Online\pawno\include\nex-ac.inc:5127
Ещё добавлю: всегда, когда возникает ошибка и код прекращается, в чат выводит SERVER: Unknown Command.