Error 4 Problems - 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: Error 4 Problems (
/showthread.php?tid=543029)
Error 4 Problems -
HoboGamings - 23.10.2014
pawn Код:
[debug] Run time error 4: "Array index out of bounds"
[00:50:43] [debug] Accessing element at index 72 past array upper bound 71
[00:50:43] [debug] AMX backtrace:
[00:50:43] [debug] #0 0051d860 in public AddCar (72) from wg-rp.amx
[00:50:43] [debug] #1 00500dbc in public Itter_OnGameModeInit () from wg-rp.amx
[00:50:43] [debug] #2 native CallLocalFunction () from samp03svr
[00:50:43] [debug] #3 00003940 in public Streamer_OnGameModeInit () from wg-rp.amx
[00:50:43] [debug] #4 native CallLocalFunction () from samp03svr
[00:50:43] [debug] #5 00002490 in public OnGameModeInit () from wg-rp.amx
pawn Код:
forward AddCar(carcoords);
public AddCar(carcoords)
{
new randcol = random(126);
new randcol2 = 1;
if(rccounter == 20)
{
rccounter = 0;
}
AddStaticVehicleEx(carselect[rccounter], CarSpawns[carcoords][pos_x], CarSpawns[carcoords][pos_y], CarSpawns[carcoords][pos_z], CarSpawns[carcoords][z_angle], randcol, randcol2, 900);
rccounter++;
return 1;
}
HELP
Respuesta: Error 4 Problems -
!R1Ch@rD! - 24.10.2014
just have these lines in OnGameModeInit?
Re: Error 4 Problems -
TakeiT - 24.10.2014
Show where that function is called in your script.
Also, there is no need to use forward then public, simply leave them out and put the actual function
Re: Respuesta: Error 4 Problems -
HoboGamings - 24.10.2014
Quote:
Originally Posted by !R1Ch@rD!
just have these lines in OnGameModeInit?
|
So you mean I should copy and paste that under OnGamemodeInIt?
Quote:
Originally Posted by TakeiT
Show where that function is called in your script.
Also, there is no need to use forward then public, simply leave them out and put the actual function
|
And you want to see what exactly, I showed my functions.
Respuesta: Error 4 Problems -
!R1Ch@rD! - 24.10.2014
I mean if you only have that function in the callback OnGameModeInit but I recommend you use this for you muetre error lines
crashdetect -d3