Posted 10 May 2012 - 04:05 AM
well i made a remote command thing
but for some reason id == controller wont return true when it displays "received 'something' from id: '0' controller id: '0'"
:C
shell.run("clear")
print("computer id is: "..os.getComputerID())
write("modem direction: ")
rednet.open(read())
write("controller id: ")
controller=read()
while true do
id,data=rednet.receive()
print("received '"..data.."' from id: '"..id.."' controller id: '"..controller.."'")
if id == controller then
print("executing")
local tWords = {}
for match in string.gmatch(data, "[^ \t]+") do
table.insert( tWords, match )
end
local sCommand = tWords[1]
if sCommand then
shell.run( sCommand, unpack( tWords, 2 ) )
end
print("done")
end
end
but for some reason id == controller wont return true when it displays "received 'something' from id: '0' controller id: '0'"
:C