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

simple rewritable monitor program

Started by whumpworld, 14 March 2013 - 01:33 AM
whumpworld #1
Posted 14 March 2013 - 02:33 AM
Title: simple rewritable monitor program
im a server owner and so i edited a program to replace the 100's of signs you normally find at spawn. but im having an issue line 1 is attempting to call string.

print("Please input a message:")
input = read()

local mon = nil

for _,s in pairs(rs.getSides()) do
if peripheral.getType(s) == "monitor" then
mon = peripheral.wrap(s)
break
end
end

if mon then
mon.clear()
mon.setCursorPos(1,1)
term.redirect(mon)
print=(input)
term.restore()
else
print("No monitor attached!")
sleep(1)
end

term.clear()
term.setCursorPos(1,1)
term.write(input)

(i dont know how to make those lovely boxs for the program)

also the entirety of the code is not mine i modified lyqyd's program to try and fit my needs
and truth be told it was working before i edited it :P/>
Lyqyd #2
Posted 14 March 2013 - 05:58 AM
Split into new topic.

You've got a print=(input) in there. Get rid of the equals sign; it is changing the print function into a string. Reboot the computer after you edit out that equals sign.