Jump to content




string.format %.2f

lua

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

#1 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 20 July 2016 - 03:24 PM

I want to format a string:

string.format('%.2f', 1.2525)
-- > returns 1.2525 instead of 1.25 expected

What am I doing wrong?

#2 Anavrins

  • Members
  • 775 posts

Posted 20 July 2016 - 04:32 PM

This formatting is broken in the current version of LuaJ apparently.

#3 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 20 July 2016 - 04:36 PM

View PostAnavrins, on 20 July 2016 - 04:32 PM, said:

This formatting is broken in the current version of LuaJ apparently.

Thanks... :(





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users