file output on windows xna
Monkey Targets Forums/XNA/file output on windows xna| 
 | ||
| does anyone have an example of how to write a .txt file using monkey output for xna for windows? | 
| 
 | ||
| Monkey currently doesn't support file writing for XNA, but the C# code for doing such a thing would be 
FileStream fs = new FileStream(Application.StartupPath + "\\test.txt", FileMode.Create);  
StreamWriter sw = new StreamWriter(fs);  
 
sw.WriteLine("This is a test");  
sw.WriteLine("This is only a test");  
 
sw.Close();  
fs.Close();Do you need to be using XNA? | 
| 
 | ||
| glfw would be fine if i could work out how to get it going. Im just looking to output data from map editor/font editor. | 
| 
 | ||
| Do you have BlitzMax smilertoo? I'm not sure if the Monkey Max target supports it yet, but it would definitely be able to if it were implemented. | 
| 
 | ||
| you can create txt files in glfw if you use the os module os.SaveString(s, CurrentDir() + "/lev10.txt") s being the string. i use this in a map editor and the above line saves all my data to a txt file called lev10.txt in the current directory. | 
| 
 | ||
| thanks, this looks usable, all i need now is to work out how to get glfw to work. I do own bmax but i havn't seen any option for a bmax target. | 
| 
 | ||
| Smilertoo : http://code.google.com/p/monkey-max/ it's a user made target :) However, it currently doesn't support the OS module, so ignore me for now! |