Posted 23 January 2013 - 06:39 AM
It keeps crying that in line 35 a 'then' is missing.
I tried a lot and asked even a friend to help, but nothing worked…
I think there is an "end" missing somewhere, but I already looked a lot and nothing
print ("Welcome to SVOS!")
print ("Please select a language!")
print ("Available: German/Deutsch; English")
lang = read()
if lang == "German" or "Deutsch" then
print ("Waehlen sie einen Benutzernamen:")
name = read()
print ("Ihr Name ist "..name.."!")
print ("Bitte waehlen sie ein Passwort:")
passwort = read("*")
print ("Ihr Passwort wurde gespeichert. Passwort anzeigen?")
pa = read()
if pa == ("ja") then
print ("Ihr passwort lautet: " ..passwort)
end
print ("Wollen sie nun speichern?")
save = read()
if save == ("ja") then
print ("Speichern...")
f = io.open("startup","w")
f:write("os.pullEvent = os.pullEventRaw\r\n")
f:write("print(\"Willkommen "..name.."!\")\r\n")
f:write("print(\"Bitte Passwort eingeben:\")\r\n")
f:write("passwort = read(\"*\")\r\n")
f:write("if passwort == (\""..passwort.."\") then \r\n")
f:write(" print(\"Passwort richtig!\")\r\n")
--f:write(" shell.run(\"programs\")\r\n")
f:write("else os.reboot()\r\n")
f:write("end\r\n")
f:write("shell.run(\"desktop\")\r\n")
f:close()
else
print ("Fehlgeschlagen..")
end
elseif lang == "English" then -- [size=6][color=#FF0000][b]Line 35[/b][/color][/size]
print ("Please choose a username:")
name = read()
print ("Your name is "..name.."!")
print ("Please select a password:")
passwort = read("*")
print ("Your password is saved. Do you want to see the password?")
pa = read()
if pa == ("yes") then
print ("Your password: " ..passwort)
end
print ("Do you want to save now?")
save = read()
if save == ("yes") then
print ("Saving...")
f = io.open("startup","w")
f:write("os.pullEvent = os.pullEventRaw\r\n")
f:write("print(\"Welcome "..name.."!\")\r\n")
f:write("print(\"Please enter your password:\")\r\n")
f:write("passwort = read(\"*\")\r\n")
f:write("if passwort == (\""..passwort.."\") then \r\n")
f:write(" print(\"Correct password!\")\r\n")
--f:write(" shell.run(\"programs\")\r\n")
f:write("else os.reboot()\r\n")
f:write("end\r\n")
f:write("shell.run(\"desktop\")\r\n")
f:close()
else
print ("Failure...")
end
end
I tried a lot and asked even a friend to help, but nothing worked…
I think there is an "end" missing somewhere, but I already looked a lot and nothing