Jump to content

HELP Hate this


roddydennvor

Recommended Posts

What is this error mean :roll:

WARNING:sound\sonidoS.luat:6: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil]

What i must to do ? Bad Argument :roll:

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 ?

Link to comment

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.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...