Helpme crash detect plugin i got logs - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Helpme crash detect plugin i got logs (
/showthread.php?tid=477903)
Helpme crash detect plugin i got logs -
bigtigerbeee - 26.11.2013
Delete Thx a lot
Re: Helpme crash detect plugin i got logs -
Jefff - 27.11.2013
vehicleid = GetPlayerVehicleID(playerid);
and what if player is not in vehicle?? vehicleid == 0
next
GetVehicleModel(vehicleid) returns 0
VehicleNames[0 - 400]
0-400 = Run time error 4: "Array index out of bounds" because VehicleName[] is from 0-211
pawn Code:
format(Vehiclename, sizeof(Vehiclename), "%s", VehicleNames[GetVehicleModel(vehicleid) - 400]);
Solution:
Check if vehicleid > 0
Re: Helpme crash detect plugin i got logs -
bigtigerbeee - 27.11.2013
Thank Jefff