Jump to content

[HELP] 'then' expected near '='


Recommended Posts

Can someone help me please?

  
function images() 
    if 
        button1 = guiCreateStaticImage(sX/4-50,sY/1.5,512/2.5,512/2.5,userpanel.image.mapshop,false) 
        and 
        button2 = guiCreateStaticImage(sX/2.3-50,sY/1.5,512/2.5,512/2.5,userpanel.image.settings,false) 
        and 
        button3 = guiCreateStaticImage(sX/1.6-50,sY/1.5,512/2.5,512/2.5,userpanel.image.music,false) 
    then else 
        destroyElement(button1) 
        destroyElement(button2) 
        destroyElement(button3) 
    end 
end 
bindKey("U","down",images) 
  

debugscript 3

  
ERROR: Loading script failed: Win8_Userpanel\interface.lua:48: 'then' expected near '=' 
  

line 48 =

  
button1 = guiCreateStaticImage(sX/4-50,sY/1.5,512/2.5,512/2.5,userpanel.image.mapshop,false) 
  

Link to comment

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...