Does LoadString have to be txt extention?
Monkey Forums/Monkey Programming/Does LoadString have to be txt extention?
| ||
I wanted to load the string data from a .fnt file. However, unless I change the extension to .txt, it won't read. Is this normal? |
| ||
I think it only reads txt or json files, not 100% sure tho as i'm on me ipad and can't double check. |
| ||
Yes. But you can change this behaviour. Use #TEXT_FILES="*.txt|*.fnt" at the beginning of your project. |
| ||
Is there a particuliar reason it is .txt, .xml, .json ? Its is dependent on the target ? If i want like .something will it still work with others devices ? |
| ||
Check the CONFIG.TXT, you will see:TEXT_FILES=*.txt|*.xml|*.json So by default all targets will load txt, xml and json. And as Volker has stated you can change this in code using the precompiler or you can change the CONFIG.TXT in your build folder. Because I use Tiled alot, I always add tmx: #TEXT_FILES=*.txt|*.xml|*.json|*.tmx This basically acts as a filter, any files which arent included do not get copied to your build folder. |
| ||
Perfect. Thanks |