"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












