DarkLink Posted June 29, 2011 Share Posted June 29, 2011 Another function giving me bad argument, why this happens so many times guys? And always seems thats everything okay .. look my code: function teleport(hitElement) if (getElementType(hitElement) == "player") then local blip = getElementAttachedTo( hitElement ) setTimer(verifica, 2000, 1, source, hitElement) if(getPlayerTeam(hitElement) == team_immigrantsSP) then setElementVisibleTo ( blip, getRootElement(), true ) end end okay so I already have a blip attached to this player (hitElement) and want to change is visibility when the player hits the marker. and want to set is visibility to all players, so I use > getRootElement() And I get this error on console: bad argument @ 'setElementVisibleTo' I would appreciate some help, I am getting these errors too frequently, and dont know how to fix them when everything seems okay Thanks! Link to comment
Wojak Posted June 29, 2011 Share Posted June 29, 2011 This function determines the element that the specified element is attached to. player in not attached to a blip, blip is attached to player, so uou need to use getAttachedElements this function returns a table Link to comment
DarkLink Posted June 29, 2011 Author Share Posted June 29, 2011 This function determines the element that the specified element is attached to. player in not attached to a blip, blip is attached to player, so uou need to use getAttachedElements this function returns a table Thanks alot bro, that was my problem, didnt notice Really thanks , u always helping me too 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