Array index out of bonus
#1

Hello, I have a big problem with my commands /vehicles where is shows me a list of all my own vehicles .

the problem is sometimes the command give me some errors:
Код:
[19:56:32] [debug] Run time error 4: "Array index out of bounds"
[19:56:32] [debug] AMX backtrace:
[19:56:32] [debug] #0 001a9030 in public cmd_vehicles (playerid=0, params[]=@01570b48 "") at D:\gamemode\gamemodes\exgaming.pwn:26313
[19:56:32] [debug] #1 001a89b4 in public cmd_v (playerid=0, params[]=@01570b48 "") at D:\gamemode\gamemodes\exgaming.pwn:26291
[19:56:32] [debug] #2 native CallLocalFunction () from samp03svr
[19:56:32] [debug] #3 00039dc8 in public OnPlayerCommandText (playerid=0, cmdtext[]=@01570b3c "/v") at D:\gamemode\pawno\include\zcmd.inc:102
/vehicles: https://pastebin.com/gY9nbdqD

Can someone help me please?
Reply
#2

show some log before that backtrace too
Reply
#3

pawn Код:
aVehicleNames[PlayerInfo[playerid][pCarModel][id] - 400]
I'm 100% certain this is the cause. PlayerInfo[playerid][pCarModel][id] is probably -1/0/whatever else, something what you don't expect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)