Posted 18 September 2012 - 01:59 AM
Hello, I'm working on a monitor client program that receives status updates from all of my computers and turtles (which currently only include the two handled in the code), and I keep hitting an error code I've never seen before. The error code is
and the program is
Any help would be hugely appreciated, thanks!
bios:206: [string "System_Monitor"]:4: ' ( ' expected
and the program is
local screen = peripheral.wrap("top")
rednet.open("bottom")
local function handle.turtle.miner(message)
screen.setCursorPos(9,2)
screen.write(message)
end
local function handle.computer.server(message)
screen.setCursorPos(28,2)
screen.write(message)
screen.setCursorPos(28,3)
screen.write("Sent: "..os.time())
end
local function handle.screenreset()
screen.setCursorPos(1,1)
screen.write("|-------- Turtles -------|- Server-Status -|")
screen.setCursorPos(1,2)
screen.write("|Miner: | |")
screen.setCursorPos(1,3)
screen.write("|Sorter: | |")
screen.setCursorPos(1,4)
screen.write("|------------------ Other -----------------|")
screen.setCursorPos(1,5)
screen.write("| |")
screen.setCursorPos(1,6)
screen.write("| |")
screen.setCursorPos(1,7)
screen.write("| |")
screen.setCursorPos(1,8)
screen.write("| |")
screen.setCursorPos(1,9)
screen.write("|------------------------------------------|")
end
handle.screenreset()
while true do
senderid, message, distance = rednet.recieve()
if senderid == 3 then handle.turtle.miner(message) end
if senderid == 0 then handle.computer.server(message) end
local event, parameter = os.pullEvent ("char")
if parameter == "c" then handle.screenreset() end
end
Any help would be hugely appreciated, thanks!