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

Simple issue..

Started by George, 06 August 2012 - 09:47 AM
George #1
Posted 06 August 2012 - 11:47 AM
Hi,

I'm new to coding LUA (that's why this issue is so simple) and I don't see what the error I am having with this program is. I've made a program called logout so that the computer will reboot back to my login system.

Here's the code:


print("Logging out...")
sleep(2)
term.clear
print("Successfully logged out.")
sleep(1)
term.clear
os.reboot

I get the error: bios:206: [string "logout"]:4: '=' expected

I don't particularly understand what that means apart from that it believes I am trying to make a variable, when I am not..

Thank you anyone who can help. I highly appreciate it.
Noodle #2
Posted 06 August 2012 - 11:52 AM
You are forgetting "()"
term.clear()
and
os.reboot()

Its a common newbie mistake :P/>/>
George #3
Posted 06 August 2012 - 12:34 PM
You are forgetting "()"
term.clear()
and
os.reboot()

Its a common newbie mistake :P/>/>

Thanks for the quick reply.