Workaround:
if component.isAvailable("stargate") then sg = component.getPrimary("stargate") if sg.energyToDial(sg.localAddress()) then return true endend
I don't think this is incorrect; component.isAvailable is just testing whether there is an SG interface unit attached. Whether there is a stargate attached to the interface is another matter.
Workaround:
if component.isAvailable("stargate") then
sg = component.getPrimary("stargate")
if sg.energyToDial(sg.localAddress()) then
return true
end
end