in this code the bold lines work, but the italics does not, they are the exact same other then how the ID is supplied, i also changed the method to call to garbage and it says that it's an invalid method, other wise it shows :
powerTest : 77 : Invalid number of parameters.
Expected 1
77 is the line of the italic callRemote
so i know it is checking, i can't help but wonder if it's not talking about callRemote but i'm just not familer enough with the api to know the issue, i also have a link to the pastebin with the full code, incase the problem exists else where and is effecting it. i also tried just putting in the peripheral name as i did with the other lines, and it shows the same error
function getPowerPercentage()
cell1 = net.callRemote("redstone_energy_cell_0", "getEnergyStored") --#Works in these four lines
cell2 = net.callRemote("redstone_energy_cell_1", "getEnergyStored")
cell3 = net.callRemote("redstone_energy_cell_2", "getEnergyStored")
cell4 = net.callRemote("redstone_energy_cell_3", "getEnergyStored")
amount = cell1 + cell2 + cell3 + cell4
return (amount / capacity) * 100
end
function setAllTankPercentage()
setTankPercentage(lavaTank)
setTankPercentage(oilTank)
setTankPercentage(fuelTank)
setTankPercentage(essenceTank)
end
function setTankPercentage(tank)
local tankCapacity = 0
local tankAmount = 0
local values = net.callRemote(tank.id,"getTanks") --#Doesn't work here
for k, v in pairs(values) do
for x, y in pairs(v) do
if x == amount then
tankAmount = y
end
if x == capacity then
tankCapacity = y
end
end
end
tank.percent = tankAmount/tankCapacity
end
full code : http://pastebin.com/BMu4V1Kk