Jump to content




Syntax error at monitor program


  • You cannot reply to this topic
1 reply to this topic

#1 Fiestaguy

  • New Members
  • 2 posts

Posted 31 October 2012 - 09:55 AM

Hello, i got this problem at my monitor when i was working at the HQ of my company:


bios :206: [string "startup"] :5: syntax error

while true do
sleep(1)
if (redstone.getInput("right")) then
monitor, back, print("Latest News:")
monitor, back, print("Someone has entered!")
end
end

the "latest news:" part and "someone has entered!" part is for my monitor in the lobby for if someone has left, entered for if u got any questions about it

#2 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 31 October 2012 - 10:19 AM

if your trying to run the program monitor in your script then you need to use shell.run()
shell.run("monitor","back","programName")

Also I don't think you can use print, Only run a program on it with the monitor program.

You're going to want to wrap the monitor and print to it kind of like this.
local monitor = peripheral.wrap("back")
term.redirect(monitor)
print("Latest News:")
print("Someone has entered!")
term.restore() -- to send back to computer






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users