Error 4 Problems
#1

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

just have these lines in OnGameModeInit?
Reply
#3

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

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.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)