Forgive my lack of competence with lua and programming in general.
I am trying to display information about my power systems ** in the centre of a 5x1 screen and I am struggling to achieve this without simply setting the text at a position on the screen, and I would much rather have the centre of the text string centered on 'width/2' and 'height/2' as the power level updates every 0.1 second and the string is different lengths in each update.
**
while true do
energy = bank.getEnergyStored(4)
capacity = bank.getMaxEnergyStored(4)
percentcalc = (energy / capacity) * 100
di