Hi
I use ComputerCraft to enable or disable my Reactor when my energy is full but there is always a problem.
The Error :reactor:9: attempt to perform arithmetic__div on nil and nil
The Program: http://pastebin.com/npnHPn02
waiting for a answer,
LordSoft
Thermal Expansion - Bigs Reactor
Started by LordSoft, Mar 29 2015 10:48 AM
1 reply to this topic
#1
Posted 29 March 2015 - 10:48 AM
#2
Posted 29 March 2015 - 10:20 PM
Quite simply, on the ninth line you're trying to divide an undefined value by an undefined value. The Lua interpreter therefore goes "huh?" and errors at you.
"cellOneEnergyStored" is never referenced anywhere else in the script. You probably meant to use something along the lines of cellOne.getEnergyStored(), or whatever the function is...
"CellOneMaxEnergy" is likely supposed to refer to "cellOneMaxEnergy", which you defined on line 5. Capitalisation matters, and so the two different labels are not the same.
level = cellOneEnergyStored/CellOneMaxEnergy*100
"cellOneEnergyStored" is never referenced anywhere else in the script. You probably meant to use something along the lines of cellOne.getEnergyStored(), or whatever the function is...
"CellOneMaxEnergy" is likely supposed to refer to "cellOneMaxEnergy", which you defined on line 5. Capitalisation matters, and so the two different labels are not the same.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











