Posted 15 May 2014 - 05:37 AM
I got my Screen program working but after a while it gives the above error it is at a random time at which it does it. The error occurs after you name it and nothing is being done.
Screen
Computer
This is what another member of the server said he is helping me
Update: we did a print(id, text) on monitor comp and at a point it printed only the id not the text and we got the error again. the nil was the text but dont know why because it worked fine for like 4 tries
As I said it doesnt happen when the info is being sent the when it gives the original error
Screen
monitor= peripheral.wrap("top")
monitor.clear()
monitor.setCursorPos(2, 2)
monitor.setTextScale(2)
rednet.open ("left")
while true do
event, id, text = os.pullEvent()
shopID = id
if shopID == 56 then
id = 101
elseif shopID == 57 then
id = 102
elseif shopID == 58 then
id = 103
elseif shopID == 59 then
id = 104
elseif shopID == 60 then
id = 105
elseif shopID == 61 then
id = 106
elseif shopID == 19 then
id = 107
elseif shopID == 18 then
id = 108
elseif shopID == 17 then
id = 109
elseif shopID == 16 then
id = 110
elseif shopID == 15 then
id = 111
elseif shopID == 14 then
id = 112
end
if event == "rednet_message" then
if id == 101 then
monitor.setCursorPos(2, 2)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 102 then
monitor.setCursorPos(2, 3)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 103 then
monitor.setCursorPos(2, 4)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 104 then
monitor.setCursorPos(2, 5)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 105 then
monitor.setCursorPos(2, 6)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 106 then
monitor.setCursorPos(2, 7)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 107 then
monitor.setCursorPos(2, 8)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 108 then
monitor.setCursorPos(2, 9)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 109 then
monitor.setCursorPos(2, 10)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 110 then
monitor.setCursorPos(2, 11)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 111 then
monitor.setCursorPos(2, 12)
monitor.clearLine()
monitor.write(id .. "- " .. text)
elseif id == 112 then
monitor.setCursorPos(2, 13)
monitor.clearLine()
monitor.write(id .. "- " .. text)
end
end
end
Computer
local PName = ""
local Input = ""
local Pass = "da5655"
function check()
if not fs.exists("Name") then
local file = io.open("Name", "w")
file:write(PName)
file:close()
end
end
function savef()
local file = io.open("Name", "w")
file:write(PName)
file:close()
end
function readf()
local file = io.open("Name", "r")
PName = file:read()
file:close()
end
function send()
rednet.open("bottom")
rednet.send(73,PName)
rednet.close("bottom")
end
check()
readf()
send()
while true do
term.clear()
term.setCursorPos(1,1)
term.write("Enter the Password to change the name.")
Input = read("*")
if Input == Pass then
term.clear()
term.setCursorPos(1,1)
term.write("Enter the name of your store.")
PName = read()
savef()
send()
else
term.write("Wrong Password")
sleep(3)
os.reboot()
end
end
This is what another member of the server said he is helping me
Update: we did a print(id, text) on monitor comp and at a point it printed only the id not the text and we got the error again. the nil was the text but dont know why because it worked fine for like 4 tries
As I said it doesnt happen when the info is being sent the when it gives the original error
Edited on 15 May 2014 - 03:48 AM