This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
gheotic's profile picture

bios:338: [string "test"] :9: 'then' expected

Started by gheotic, 17 January 2013 - 02:33 AM
gheotic #1
Posted 17 January 2013 - 03:33 AM
keep getting this error
can someone tell me how to fix it?

while true do
shell.run("clear")
local nTime = os.time()
local Time =textutils.formatTime( nTime, false)
;print( "Time: "..textutils.formatTime( nTime, false ) )
sleep(0.25)
print(Time)

if Time == 0:10AM then
term.clear()
print("Time is now 0:10 AMs
end
end

Any help would be appreciated :)/>
theoriginalbit #2
Posted 17 January 2013 - 03:37 AM
if Time == "0:10AM" then
you missed the quotes around the string… also line 11 you are missing closing quote and bracket.
gheotic #3
Posted 17 January 2013 - 03:46 AM
Thank you :)/>