LaCosTa Posted July 7, 2015 Share Posted July 7, 2015 I don't know but this thing happens to me alot when I use this function(thePlayer) if (getElementType(thePlayer)=="player") then -- it outputs a debug error : expect elemnt in argument 1 got number or sometimes string or nothing . Is there a solution for that? Link to comment
darhal Posted July 7, 2015 Share Posted July 7, 2015 This depend how you call the function and how is it the first argument which is thePlayer in your case anyway make sure that the passed argument is not number/table/string/number by doing this function(thePlayer) if type(thePlayer) == "string" or type(thePlayer) == "number" or type(thePlayer) == "table" or type(thePlayer) == "boolean" then return end if (getElementType(thePlayer)=="player") then -- 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