Run time error 4: "Array index out of bounds"
#1

Hello, i get this error (in server_log) when i use /deletevehicle on my server, the problem is the dialog, i don't know what should i do to fix this.

Dialog: https://pastebin.com/m4hPxrjL

Error (server_log):
Код:
[17:01:40] [debug] Run time error 4: "Array index out of bounds"
[17:01:40] [debug] AMX backtrace:
[17:01:40] [debug] #0 002afcf8 in public OnDialogResponse (0, 676, 1, -1, 58432840) from leddz.amx
Reply
#2

Show us your VehicleInfo's declaration
Reply
#3

Quote:
Originally Posted by X337
Посмотреть сообщение
Show us your VehicleInfo's declaration
Here: https://pastebin.com/9eja5mkW
Reply
#4

MAX_VEHICLES is 2000 by default.
You got that array index out of bounds because you are accessing array index of VehicleInfo which doesn't exists (>= 1000). A simple fix is by declaring VehicleInfo with MAX_VEHICLES as its size or use iterator.
Reply
#5

Quote:
Originally Posted by X337
Посмотреть сообщение
MAX_VEHICLES is 2000 by default.
You got that array index out of bounds because you are accessing array index of VehicleInfo which doesn't exists (>= 1000). A simple fix is by declaring VehicleInfo with MAX_VEHICLES as its size or use iterator.
Thanks bro, its work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)