I know this has been answered before. And I also looked it up at different forums, but apparently Im missing something.
So, this is the code Im using:
local eustored = mfsu.getEUStored() perc = eustored / mfsu.getEUCapacity() * 100 term.write(string.format("%.2f", perc).. " %")
Im trying to get "perc" written as a 2 decimal number, but it looks like its not formatting the number in anyway. As far as Im aware Im doing exactly what the tutorials/examples write. So, what am I doing wrong?