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

Need Help!

Started by Macadamia, 10 June 2014 - 08:11 AM
Macadamia #1
Posted 10 June 2014 - 10:11 AM
Hi, I'm new to lua, and this is my second program. It's supposed to display the text "Data Monitors"
on the monitor to the left. I don't know what's wrong with it, there's just so many errors! And don't
be afraid to use a lot of technical jargon, I'm good with programming, just not lua… yet ;)/>.
Here is the code:

print ("DO NOT USE LOCK ON THIS COMPUTER") –Ignore this
sleep(4)
term.clear()

if
then
term.redirect (peripheral.wrap ("left"))
print ("Data Monitors")
end

Hope you can help me!
CometWolf #2
Posted 10 June 2014 - 12:32 PM
the proper syntax for an if statment would be

if condition then
You however, appear to be missing a condition in yours, which would probably error yeah. Though please, post the actual error next time.