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

Capacitor Bank problem

Started by DarkSavior20, 08 July 2015 - 02:19 PM
DarkSavior20 #1
Posted 08 July 2015 - 04:19 PM
Hi guys!
I've got a little problem. I'm new in cc and in lua so i don't know a lot of things ;d. I wanted make a program which gives me turbine, reactor and capacitor bank stats.
And there is a problem. I used a function called getEnergyStored. Works almost perfectly but mine result is 2.5E7 instead of 25.000.000 (my vibrant capacitor is full). How to change this guys ??
Btw how to do a progress bar on monitor ? I want to show energy as progress bar.

Sorry for my english ;/ I'm young guy from Poland ;d
Bomb Bloke #2
Posted 09 July 2015 - 12:55 AM
Works almost perfectly but mine result is 2.5E7 instead of 25.000.000 (my vibrant capacitor is full). How to change this guys ??

2.5E7 is the same as 25,000,000, but it's formatted differently.

The tostring() function will format it the way you want it. Eg, mon.write(tostring(energyValue)).
DarkSavior20 #3
Posted 09 July 2015 - 08:25 AM
I knew it's the same ;d I should ask how to format it but w/e now. Thank u very much :)/>