This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
iconmaster's profile picture

:bios:333 error (Tekkit & ccSensors)

Started by iconmaster, 16 December 2012 - 12:04 PM
iconmaster #1
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:

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
KaoS #2
Posted 17 December 2012 - 03:29 AM
with the fs api you do not use ':' rather use '.'


local succ,err = loadstring(http.get(fs.open("url","r").readAll())
if not succ then print(err) end
succ()
remiX #3
Posted 17 December 2012 - 11:20 AM
with the fs api you do not use ':' rather use ','

You mean '.' :P/> Even though you used a fullstop in your code and not a command ;)/>
KaoS #4
Posted 17 December 2012 - 03:10 PM
lol derpity derpity derp. thanks remiX, corrected