^Dev-PoinT^ Posted October 31, 2011 Posted October 31, 2011 Hi i always get error in getPlayerName + setElementData see function xxx () pname = getPlayerName() setElementData(thePlayer,"Score",0) setElementData(thePlayer,"kills",0) setElementData(thePlayer,"deaths",0) setElementData(thePlayer,"dmg",0) setElementData(thePlayer,"Damage",0) setElementData(thePlayer,"level",0) setElementData(thePlayer,"exp",0) outputChatBox(getPlayerName.."Has Format His Score", getRootElement(), 255, 255, 0, true ) end addCommandHandler("rest", xxx)
Aibo Posted October 31, 2011 Posted October 31, 2011 this is random code. xxx() should have arguments pname should be local getPlayerName() get whose name? thePlayer isnt defined anywhere getPlayerName is a function, you cant concatenate a function
^Dev-PoinT^ Posted October 31, 2011 Author Posted October 31, 2011 you mean Like This ? function xxx (thePlayer) local pname = getPlayerName(thePlayer) setElementData(thePlayer,"Score",0) setElementData(thePlayer,"kills",0) setElementData(thePlayer,"deaths",0) setElementData(thePlayer,"dmg",0) setElementData(thePlayer,"Damage",0) setElementData(thePlayer,"level",0) setElementData(thePlayer,"exp",0) outputChatBox(pname.."Has Format His Score", getRootElement(), 255, 255, 0, true ) end addCommandHandler("rest", xxx)
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