Posted 16 December 2012 - 01:04 PM
I'm using Tekkit in conjunction with ccSensors, and I can't get this program running.
My error message is "bios:333: bad argument: string expected, got table".
I am running Tekkit 3.1.2. My first program is this:
My error message is "bios:333: bad argument: string expected, got table".
I am running Tekkit 3.1.2. My first program is this:
local succ,err = loadstring(http.get(fs.open("url","r"):readAll())
if not succ then print(err) end
succ()
The program that is loadstringed via HTTP link is:
--os.unloadAPI("sensorsData")
--os.loadAPI("/rom/apis/sensorsData")
--os.unloadAPI("sensors")
--os.loadAPI("/rom/apis/sensors")
--os.unloadAPI("sensorsUI")
--os.loadAPI("/rom/apis/sensorsUI")
local side = sensors.getController()
print(side)
local targ = sensors.getAvailableTargets(side,"IconMFSU")
local maxx = (sensors.getReading2(side,"IconMFSU","EUStorage",targ[1]))["maxStorage"]
while true do
sleep(1)
local fill = (sensors.getReading2(side,"IconMFSU","EUStorage",targ[1]))["energy"]
redstone.setOutput("front",fill/maxx < .75)
end