Mungpath
Monkey Forums/Monkey Bug Reports/Mungpath
| ||
Hey guys, I have a text file inside a folder at my "data" folder. I was calling it like: LoadString("/interior/mytext.txt") Working 100%, but when I changed to Android or Flash target it didnīt work. Looking at target source code I found that "mungpath" function was putting a "0" before the first "/" from the path (something +/- like: "_0_7interior_6mytext_3txt") and the generated resource embed name didnīt had the first "0" Removing the first "/" was the solution, but I guess that's a bug, not? |
| ||
Hi, This stuff is still a bit 'up in the air'. Until recently, Monkey could only load stuff from data/, but recent additions mean you can now load stuff from the filesystem/http (depending on target) so a '/' prefix now has some meaning, whereas it didn't really before. The correct way to locate stuff in the data/ dir is to use the 'monkey://data/' prefix, but Mojo automatically adds this for you if you give it a relative URL to maintain compatibility. So best to either leave the '/' off when using Mojo, or explicitly use 'monkey://data/'. |
| ||
Got it, tks! x) |