FuriouZ Posted January 7, 2015 Share 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. Link to comment
Gallardo9944 Posted January 7, 2015 Share 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 Link to comment
FuriouZ Posted January 7, 2015 Author Share Posted January 7, 2015 It doesn't give the warning anymore. Thanks! Link to comment
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