roddydennvor Posted November 23, 2014 Posted November 23, 2014 What is this error mean WARNING:sound\sonidoS.luat:6: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil] What i must to do ? Bad Argument This is the script... function onVehicleLocked( ) local sound = playSound("clink.mp3",false) setSoundVolume(sound, 0.5) end addEventHandler ( "onVehicleLocked", getLocalPlayer(), player_Spawn ) on line 6 i can see this : addEventHandler ( "onVehicleLocked", getLocalPlayer(), player_Spawn ) i think the error is "player_Spawn" right ?
Skuleris Posted November 23, 2014 Posted November 23, 2014 Yes, the problem is in line 6. replace "player_Spawn" with "onVehicleLocked". addEventHandler ( "onVehicleLocked", getLocalPlayer(), onVehicleLocked ) WARNING:sound\sonidoS.luat:6: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil] The problem is told there. Expected function at argument 3, got nil. Argument 3 is player_Spawn, argument 2 is getLocalPlayer() and so on. You got on argument 3 nil = nothing. That may be, because "player_Spawn" isn't added as a function.
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