Errors in debug
#1

Hello, when player connecting to server, in console write errors:

Quote:

[15:25:13] [debug] Run time error 4: "Array index out of bounds"
[15:25:13] [debug] Accessing element at index 65535 past array upper bound 1999
[15:25:13] [debug] AMX backtrace:
[15:25:13] [debug] #0 0014d090 in ?? (0x00000000, 0x00000003, 0x00000000) from samp.amx
[15:25:13] [debug] #1 0014cad4 in public AutomobiliuKrovimas (0x00000000) from samp.amx
[15:25:13] [debug] #2 00062a24 in public OnPlayerSpawn (0x00000000) from samp.amx

What's can be problem?
Reply
#2

It's explicit enough, isn't it ?

You try to access an element in your array at index 65535 whereas your array's size is 2000 and thus the upper bound is 1999.
Reply
#3

If you're doing something like
pawn Код:
vehicle = CreateVehicle(<params>);

VehicleColor[vehicle] = 0;
keep in mind that you should check if "vehicle" is not 65535, i.e. the vehicle has been created successfully. Otherwise you will do something like VehicleColor[65535] = 0; which is out of bounds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)