Posted 22 July 2013 - 03:43 PM
Hello, I have been coding a system that allows computers to be remotely controlled from other computers in the game, I am on my final piece of code, however I keep seeming to get one error after another, and I can't see anything wrong with my code at this point but I still get the following error
"STARTUP:5: attempt to index ? (a nil value)"
Could anyone take a look at my code and tell me what's wrong?
I am still rather new to LUA and could use a more proficient set of eyes, as always, thanks to this extremely helpful community.
"STARTUP:5: attempt to index ? (a nil value)"
Could anyone take a look at my code and tell me what's wrong?
I am still rather new to LUA and could use a more proficient set of eyes, as always, thanks to this extremely helpful community.
cb = peripheral.wrap("bottom")
while true do
content = http.get("http://projectbuilder.info/fetch.php?cmd=page&ID=GATENET")
s = content.readAll()
if s == "" then
sleep(2)
else
GID, origin, dest = string.match(s, "(%d+)|(%a+)|(%a+)")
content = http.get("http://projectbuilder.info/fetch.php?cmd=page&ID=gatereqdel&GID="..GID)
cb.setCommand("gate activate " .. origin .. " " .. dest)
cb.runCommand()
end
sleep(2)
end