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

[Lua][Error]

Started by STALKEROK, 15 July 2012 - 12:32 PM
STALKEROK #1
Posted 15 July 2012 - 02:32 PM
Hi everyone!
I'm russian people and I can to speak a very bad, but I understand you. Please, speak more easy)

rednet:350: string expected
c1- computer 1
c2-computer 2

enter the login c1 —rednet—- c2 if login is correct he sends to c1 with true…. Please, watch a source code. I can't Explain.

с1=
rednet.open("bottom")
print("Hi!")
print("Your nick is???")
c=read()
rednet.send(4,c)
m=rednet.receive()
k="1"
if m==k then
do print("Please, Enter your password!")
t=read()
rednet.send(4,t)
sleep(0.5)
os.reboot()
end
else
do oc.reboot()
end
end



с2
rs.setOutput("left",true)

rs.setOutput("right",true)
rednet.open("top")
g="STALKEROK"
a,c=rednet.receive()
if g==c then
do rednet.send(2,1)
e="1998"
b=rednet.receive()
if b==e then
do rs.setOutput("left",false)
sleep(10)
rs.setOutput("left",true)
os.reboot()
end
else
do rs.setOutput("right",true)
rs.setOutput("front",false)
sleep(5)
rs.setOutput("front",true)
rs.setOutput("right",false)
os.reboot()
end
end
end
else
do rednet.send(2,2)
rs.setOutput("front",false)
rs.setOutput("right",true)
sleep(5)
rs.setOutput("front",true)
rs.setOutput("right",false)
os.reboot()
end
end
STALKEROK #2
Posted 15 July 2012 - 03:18 PM
I fix my code and it work very good.