Posted 07 January 2014 - 12:59 PM
Hi guys, I'm in need of some help, so thats why I have come here for it :D/>.
I have created a program to get the information of the total energy that I have on my "Redstone Energy Cell".
Now I wanted to create a new program ( lets called the main program ) to get the information from the others that I have created, like the one above.
But when I try to get the info from it, I only get a bolean ( True ) and not the result of the return.
What can i do here to improved?
I have created a program to get the information of the total energy that I have on my "Redstone Energy Cell".
local e_cell = "redstone_energy_cell_"
function read_energy_cell()
cell_stored = 0
for i=4,15 do
cell = peripheral.wrap(e_cell..i)
cell_stored = cell_stored + cell.getEnergyStored()
end
return cell_stored
end
Now I wanted to create a new program ( lets called the main program ) to get the information from the others that I have created, like the one above.
But when I try to get the info from it, I only get a bolean ( True ) and not the result of the return.
moni = peripheral.wrap("left)
moni.clear()
local mj_avai = os.loadAPI("energia/read_energy")
moni.write(mj_avai)
What can i do here to improved?