FuriouZ Posted January 7, 2015 Posted January 7, 2015 Hey! I have a problem, debug gives me a warning ..."Bad argument @ 'getVehicleType' [Expected number at argument 1, got boolean] local localVehicle = getPedOccupiedVehicle (getLocalPlayer()) if ( isPedInVehicle(localPlayer) ) and ( getVehicleType(localVehicle) == "Helicopter" ) then -- else -- end Everything works, but debug just gives me this error. Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Gallardo9944 Posted January 7, 2015 Posted January 7, 2015 What's the point of all those checks? local veh = getPedOccupiedVehicle(localPlayer) if isElement(veh) and getVehicleType(veh) == "Helicopter" then -- you don't need isPedInVehicle because getPedOccupiedVehicle already returns required things. Simply check if it's an element and you should be fine -- else -- end Code Debugger - Minimalistic MTA debug line replacement
FuriouZ Posted January 7, 2015 Author Posted January 7, 2015 It doesn't give the warning anymore. Thanks! Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now