"Array index out of bounds" for vehicles
#1

So basically when i open the server.exe this lines are printed:
pawn Код:
[23:51:16] [debug] Run time error 4: "Array index out of bounds"
[23:51:16] [debug]  Accessing element at index 200 past array upper bound 199
[23:51:16] [debug] AMX backtrace:
[23:51:16] [debug] #0 0006010c in ?? () from test.amx
[23:51:16] [debug] #1 00076270 in public RL_OnGameModeInit () from test.amx
[23:51:16] [debug] #2 native CallLocalFunction () from samp-server.exe
[23:51:16] [debug] #3 0002231c in ?? () from scratch.amx
[23:51:16] [debug] #4 00019b84 in public CB_OnGameModeInit () from test.amx
[23:51:16] [debug] #5 00009dec in public Itter_OnGameModeInit () from test.amx
[23:51:16] [debug] #6 native CallLocalFunction () from samp-server.exe
[23:51:16] [debug] #7 00008264 in public ScriptInit_OnGameModeInit () from test.amx
[23:51:16] [debug] #8 000071e8 in public zcmd_OnGameModeInit () from test.amx
[23:51:16] [debug] #9 native CallLocalFunction () from samp-server.exe
[23:51:16] [debug] #10 00006cdc in public SSCANF_OnGameModeInit () from test.amx
[23:51:16] [debug] #11 native CallLocalFunction () from samp-server.exe
[23:51:16] [debug] #12 00000fb8 in public OnGameModeInit () from test.amx
I know the source of the errors and here is it:
pawn Код:
for(new i=1; i < MAX_VEHICLES; i++) VehicleLabel[i] = Create3DTextLabel("VehicleID", COLOR_TGREY, 1.37291, -1.14804, -0.12739, 20.0, 0);
Why this is happening? I want to create the 3dtext then when players chooses text it will attach to this text & then to the vehicle. This text is basically vehicle3dtext so i have to use it with [vehicleid] & the actual vehicleid will be taken with GetPlayerVehicleID when he execute the command.
Reply


Messages In This Thread
"Array index out of bounds" for vehicles - by maximthepain - 26.03.2015, 21:55
Re: "Array index out of bounds" for vehicles - by Pottus - 26.03.2015, 21:57
Re: "Array index out of bounds" for vehicles - by maximthepain - 26.03.2015, 22:00

Forum Jump:


Users browsing this thread: 2 Guest(s)