triplesnake Posted October 6, 2011 Share Posted October 6, 2011 if getElementType ( hitElement ) == "player" it says ba argument Link to comment
DakiLLa Posted October 6, 2011 Share Posted October 6, 2011 Probably 'hitElement' contains nothing (false, nil or whatever). if hitElement then if getElementType ( hitElement ) == "player" then --blah blah end end Link to comment
myonlake Posted October 6, 2011 Share Posted October 6, 2011 function example(hitElement) if hitElement then if getElementType(hitElement) == "player" then -- Stuff here end end end Should work just fine. Link to comment
karlis Posted October 6, 2011 Share Posted October 6, 2011 function example(hitElement) if hitElement then if getElementType(hitElement) == "player" then -- Stuff here end end end Should work just fine. read 1 post above. and btw you can do this: if hitElement and getElementType(hitElement) == "player" then ... end to save space 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