Jump to content

getElementData problem


..:D&G:..

Recommended Posts

Posted

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?

Posted
function checkShipment(button, state, thePlayer) 
local level = getElementData(thePlayer, "level") 
    if (thePlayer == bCheck ) and (thePlayer == left) then 

Posted
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 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...