.txt file on Build

Monkey Forums/Monkey Programming/.txt file on Build

darky000(Posted 2013) [#1]
Hello!

I'm new to this monkey and have been following the beginner's guide to game design. I did a few games before this problem occured. I followed the game sample code on Chapter 7 which is At the Docks.

There is a level1.txt, level2.txt, so on file on my .data folder but during build, the file is lost on the data folder which runs an error when proceeding on levels. Any help on how to retain the .txt files?


ziggy(Posted 2013) [#2]
Are you sure your data folder has the same name as your entry point monkey folder? If your monkey folder where the Main function is is called myfile.monkey, the data folder has to be called myfile.data


AdamRedwoods(Posted 2013) [#3]
to retain text files, place this at the top of your .monkey file:
#TEXT_FILES="*.txt|*.xml|*.json"


Although, this should be default.


darky000(Posted 2013) [#4]
@ziggy - yes, they do have the same name as my .data

@AdamRedwoods - works perfectly! I'm using the old version of the monkey and this must be the reason for the error not included in those updates. Thanks a bunch.


MikeHart(Posted 2013) [#5]
You should use the newest version of monkey. You could run into some errors in the samples but they are easy to fix. And thank you for getting the book.


darky000(Posted 2013) [#6]
@Mike - it is definitely a great book! It covers everything and explains what each one does. Great for beginners like me. It feeds my curiousity on how games were created. Thank you so much for making this, Mike. :)


MikeHart(Posted 2013) [#7]
Darky000, thanks for the nice words!