Jump to content




Capacitor Bank problem


  • You cannot reply to this topic
2 replies to this topic

#1 DarkSavior20

  • New Members
  • 2 posts

Posted 08 July 2015 - 03: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

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 July 2015 - 11:55 PM

View PostDarkSavior20, on 08 July 2015 - 03:19 PM, said:

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)).

#3 DarkSavior20

  • New Members
  • 2 posts

Posted 09 July 2015 - 07:25 AM

I knew it's the same ;d I should ask how to format it but w/e now. Thank u very much :)





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users