Types/LocalisedString missing number variant

Post Reply
User avatar
BrainGamer_
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sun Nov 14, 2021 9:52 pm
Contact:

Types/LocalisedString missing number variant

Post by BrainGamer_ »

Localised strings appear to not only consist of strings, bools or arrays of itself.
Apparently they can also be numbers (integers and floats, tho double would make the most sense here I guess).

The provided examples even show localised strings with numbers in them :D

Bilka
Factorio Staff
Factorio Staff
Posts: 3157
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Types/LocalisedString missing number variant

Post by Bilka »

They indeed allow numbers. Added to the docs for the next version, thanks for pointing it out.

Note that in 2.0, they do not allow any number or bool - you need to call tostring() on them first if you want to use those types.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Resolved Requests”