I'm making a very basic level editor, & its save function works by creating a temporary tester sprite which scans over the playing grid, & an array is then filled with values from objects that overlap the tester.
The problem I'm having is that when downloading the array as a text file, it doesn't always save properly. Sometimes it downloads what looks like a random string of chinese characters, other times it works.
The problem can usually be fixed in the level editor by pressing its reset button (clearing the array & playing grid of objects), then laying out again & saving.
Any idea what might be causing this hit & miss behaviour?
fyi here's what the save events look like:
<img src="https://dl.dropboxusercontent.com/u/52354372/save_array_problem.png" border="0" />