Posted 12 March 2013 - 09:52 AM
Hi! Im trying to make a program for booking rooms like in hotels.
I want to make it check if the room´s booked or not and if its booked do one thing and if its not booked do another thing..
But when i try to run it i get this error message: bios:388: [string "startup"]:29: 'then' expected
I've tried to figure out how to fix it but i cant find any information on it …
Please help me.
Well.. anyways heres the script:
I want to make it check if the room´s booked or not and if its booked do one thing and if its not booked do another thing..
But when i try to run it i get this error message: bios:388: [string "startup"]:29: 'then' expected
I've tried to figure out how to fix it but i cant find any information on it …
Please help me.
Well.. anyways heres the script:
room1 = false
room2 = false
function start()
term.clear()
term.setCursorPos(1,1)
print("[1] Booking")
term.setCursorPos(1,2)
print("[2] Unbooking")
term.setCursorPos(1,3)
write("Input number: ")
local input = read()
if input == "1" then
book()
elseif input == "2" then
unbook()
else
start()
end
end
function book()
term.clear()
term.setCursorPos(1,1)
print("Booking")
term.setCursorPos(1,2)
write("What room would you like to book?: ")
local input = read()
if input == "1" and (room1) = false then
term.clear()
term.setCursorPos(1,1)
print("debug")
end
end
start()