'end' expected (to close 'if' at line 8) near '<eof>' Help me please!

This is my code i don’t know whats wrong with it i just started lua like yesterday and i came up with this program!

It’s a good program just i’m getting ‘end’ expected (to close ‘if’ at line 8) near ‘<eof>’ Error… When i try to run it.

Here is the code.

function wait(waitTime)
    local timer = os.time()
    repeat until os.time() > timer + waitTime
end

print(“Do you want to open Minecraft, FTB or Technic?”)
input = io.read()
if input == “FTB” then
    print(“Opening FTB!”)
    os.execute(“E:\FTB\FTB_Launcher.jar”)
    wait(1)
elseif input == "Minecraft"then
    print(“Opening Minecraft!”)
    os.execute(“Minecraft”)
    wait(1)
elseif input == “Technic” then
    print(“Opening Technic!”)
    os.execute(“E:\Tekkit\TechnicLauncher.exe”)
    wait(1)

–Yes ik this may look… A bit… yea…
elseif input == “Secret” then
    print(“Password”)
    password = topassword(io.read())
    if password == “Selena” then
    os.execute(“E:\Lua\Progams\data\Data”)
    print(“Good choice”)
    wait(1)
else
print(“That is not a registered program”)
wait(2)
end

Like i said i’m new to this. So if its obvious. sorry D:
 

You are missing space before “then” here _ elseif input == "Minecraft"then _

Not sure about the rest of it though, the os.execute stuff…

Keep in mind that os.execute() only works in the Simulator.

It will not work on a mobile device…

I know it wont work on a mobil device i just made this to take all the icons off my desktop.

And if i made this confusing or a BAD way does any one suggest a differnt way?

It’s hard to give advice, as jonjonsson said you can’t use os.execute() on the mobile so we don’t know what your end goal is?!?

I said its just a program to keep my COMPUTER Desktop Clean it will open specified programs…

But you’re on forums for a framework that is exclusively designed for mobile devices - I’m sure somebody might know, but like me, I’m pretty sure the vast majority of people here are orientated toward mobile development and won’t probably know about desktop development.

Who knows - perhaps Stack Overlfow would be a better place to ask?

Ohhhhh My bad i didn’t know thats what this fourm was D:

I’ll take this else where.

elseif input == "Secret" then print("Password") password = topassword(io.read()) if password == "Selena" then os.execute("E:\\Lua\\Progams\\data\\Data") print("Good choice") wait(1) ------------------------------------------------You Should Be Ending This IF Statement Somewhere Around Here else print("That is not a registered program") wait(2) end

You have the check for password==“Selena” but you never close that if statement.

Ohhhh Thank you so much!

Yep that fixed it thank you so much!

You are missing space before “then” here _ elseif input == "Minecraft"then _

Not sure about the rest of it though, the os.execute stuff…

Keep in mind that os.execute() only works in the Simulator.

It will not work on a mobile device…

I know it wont work on a mobil device i just made this to take all the icons off my desktop.

And if i made this confusing or a BAD way does any one suggest a differnt way?

It’s hard to give advice, as jonjonsson said you can’t use os.execute() on the mobile so we don’t know what your end goal is?!?

I said its just a program to keep my COMPUTER Desktop Clean it will open specified programs…

But you’re on forums for a framework that is exclusively designed for mobile devices - I’m sure somebody might know, but like me, I’m pretty sure the vast majority of people here are orientated toward mobile development and won’t probably know about desktop development.

Who knows - perhaps Stack Overlfow would be a better place to ask?