Having trouble getting LoadString to work
Monkey Forums/Monkey Programming/Having trouble getting LoadString to work
| ||
I have tried to get this command to load a text file I had on my macbook. I have created the .data folder in my projects folder with the same name at the start. When I build my app it does copy this file into the builds .data file so that seems ok. I am unable to see or retrieve the contents though. Are there any tips to doing this? If anyone has a working example that would be great. Can't see what I've missed! |
| ||
what's the extension for the file you are trying to open? |
| ||
Just a simple text file .txt |
| ||
post your code here |
| ||
erm I basically used the example, hacked it a little bit so that it just displays the loadstring result, but i don't see anything. Im pretty sure I'm missing something. |
| ||
Well post your code so we can help you ;) |
| ||
Yea sorry I should have posted the code but I didn't dare do it yesterday as I was very drunk and likely to make a tit out of myself! I have just tried another test with a different txt file and it now works... so I'm a little baffled, but rather happy. |
| ||
You need to SetUpdateRate in the OnCreate Method. |
| ||
OMG ! how can anyone guess that? |
| ||
Its required for any mojo app to run... I think it should be defaulted to 60 so you dont need to set it yourself, unless you need to change it. @NoOdle - I notice that you have added the SetUpdateRate now, did it work? |
| ||
the set update rate actually didn't make any different to the loaded string, my text file was corrupt, which it didn't like. :P |