..:D&G:.. Posted November 17, 2014 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?
boro Posted November 17, 2014 Posted November 17, 2014 function checkShipment(button, state, thePlayer) local level = getElementData(thePlayer, "level") if (thePlayer == bCheck ) and (thePlayer == left) then
..:D&G:.. Posted November 17, 2014 Author Posted November 17, 2014 Now it says it gets the number 660.
SkatCh Posted November 17, 2014 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
#DRAGON!FIRE Posted November 17, 2014 Posted November 17, 2014 theplayer ? what's Event ? post full code
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