Posted 19 February 2013 - 01:38 AM
[EDIT]
I forgot to put this :
Title : [error/bios:474 String Expected]
[/end EDIT]
Hi, I have an error with this code when I try to write on a monitor. The same code works fine for the computer, but when I change it for monitor I tells me bios:474 String expected.
heres the code (ignore all the comment junk it was for running step by step test to see if everything worked):
–local fap = os.time()
–local wO, hO = term.getSize()
–local xO, yO = term.getCursorPos()
–local fapL = 0
–os.loadAPI("sync")
–monitor = peripheral.wrap(right)
while true do
–sync.redirect(true)
–sync.addMonitor(right)
monitor = peripheral.wrap(right)
fap = os.time()
wO, hO = monitor.getSize()
fap = textutils.formatTime(fap, true)
fapL = string.len(fap)
–print(fapL)
–print(wO)
–print(hO)
xC = math.floor((wO-fapL)/2)
–print(xC)
yC = math.floor(hO/2)
monitor.setCursorPos(xC, yC)
monitor.write(fap)
sleep(1)
monitor.clear()
end
thank you!
I forgot to put this :
Title : [error/bios:474 String Expected]
[/end EDIT]
Hi, I have an error with this code when I try to write on a monitor. The same code works fine for the computer, but when I change it for monitor I tells me bios:474 String expected.
heres the code (ignore all the comment junk it was for running step by step test to see if everything worked):
–local fap = os.time()
–local wO, hO = term.getSize()
–local xO, yO = term.getCursorPos()
–local fapL = 0
–os.loadAPI("sync")
–monitor = peripheral.wrap(right)
while true do
–sync.redirect(true)
–sync.addMonitor(right)
monitor = peripheral.wrap(right)
fap = os.time()
wO, hO = monitor.getSize()
fap = textutils.formatTime(fap, true)
fapL = string.len(fap)
–print(fapL)
–print(wO)
–print(hO)
xC = math.floor((wO-fapL)/2)
–print(xC)
yC = math.floor(hO/2)
monitor.setCursorPos(xC, yC)
monitor.write(fap)
sleep(1)
monitor.clear()
end
thank you!