"return 0" issue.
#6

Okay, so based on the debugger I can already tell what the issue is.

The "VehicleNames" array is 212 cells in size and in some cases when you're using GetVehicleName, the vehicleid argument that's being passed is invalid, which means the model being taken from that is going to turn up as 0, which means you are then pointing to VehicleNames[-400], which doesn't exist and results in a runtime error. This lines up with your debugging information: "Accessing element at negative index -400".

So you need to do some debugging, you need to print the value of Player[playerid][CarKey1] and the value that's returned by your macro "OwnedCar", as clearly it's not returning the correct value. Print those values at the start of your command and see the output, check if the return values are valid.
Reply


Messages In This Thread
"return 0" issue. - by iGetty - 29.06.2012, 03:03
Re: "return 0" issue. - by JaTochNietDan - 29.06.2012, 03:15
Re: "return 0" issue. - by iGetty - 29.06.2012, 03:16
Re: "return 0" issue. - by JaTochNietDan - 29.06.2012, 03:22
Re: "return 0" issue. - by iGetty - 29.06.2012, 03:24
Re: "return 0" issue. - by JaTochNietDan - 29.06.2012, 03:29
Re: "return 0" issue. - by iGetty - 29.06.2012, 03:41
Re: "return 0" issue. - by iGetty - 29.06.2012, 16:14
Re: "return 0" issue. - by pyrodave - 29.06.2012, 16:21
Re: "return 0" issue. - by iGetty - 29.06.2012, 16:57

Forum Jump:


Users browsing this thread: 1 Guest(s)