..:D&G:.. Posted November 17, 2014 Share Posted November 17, 2014 Hello guys, I keep getting an error when I want to get an element data of the player that clicks a button function checkShipment(button, state, thePlayer) local level = getElementData(thePlayer, "level") if (source==bCheck) and (button=="left") then .................................. I keep getting the error which says that the script gets the string "left", as the script gets the element data of the button and not the player. Any ideas how to fix it? Link to comment
boro Posted November 17, 2014 Share Posted November 17, 2014 function checkShipment(button, state, thePlayer) local level = getElementData(thePlayer, "level") if (thePlayer == bCheck ) and (thePlayer == left) then Link to comment
..:D&G:.. Posted November 17, 2014 Author Share Posted November 17, 2014 Now it says it gets the number 660. Link to comment
SkatCh Posted November 17, 2014 Share Posted November 17, 2014 function checkShipment(button, state, thePlayer) local level = getElementData(thePlayer, "level") if (source==bCheck) then if (button ~= "left" or state ~= "down") then return end -- < your code here > end end Link to comment
#DRAGON!FIRE Posted November 17, 2014 Share Posted November 17, 2014 theplayer ? what's Event ? post full code 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