I'm trying to write a program that checks the power in my Stargate and it's state (connected, idle, etc...) and then turn my reactor on and of accordingly. It works for the power portion but does not seem to care about the of the gate. I also have a config file that is working I'm including it in case anybody notices something wrong with it.
here are the codes:
config file:
c = require("component")
e = require("event") ---here in case I choose to write other progams
r = c.getPrimary("br_reactor")
s = c.getPrimary("stargate")
t = require("term") ---here in case I choose to write o