Can't get SaveString to work on Mac

Monkey Targets Forums/Desktop/Can't get SaveString to work on Mac

Grey Alien(Posted 2012) [#1]
Hi all, I'm using monkey for a 48-hour gamejam and I can't get SaveString to work when compiling using GLFW. Basically no file gets created. Any ideas where I'm going wrong? I'm using MonkeyPro055. Thx!

#if TARGET="glfw" Then
  os.SaveString("test",CurrentDir()+"/testfile.txt")
#End		


Also I can't get a file I made manually to load with:
  test = os.LoadString(CurrentDir()+"/testfile2.txt")


CurrentDir() seems to be returning the desktop on my Mac so that should work right? [EDIT]Oops, I was rendering the string to my in-game display and it was being truncated after desktop and so I made the assumption that is where the currentdir was, bit dumb.

Even without CurrentDir(), nothing happens and Finder can't find any created files.

I must be doing something dumb. I'm trying to make a level editor.


Grey Alien(Posted 2012) [#2]
Ha well I upgraded to Monkey 059 and now the Print command and errors show up in the output and I was able to discover that the files are being written to: /Users/jake/Desktop/MonkeyPro59/Jake/DyingToLive/DyingToLive.build/glfw/xcode/build/Debug/MonkeyGame.app/Contents/Resources

This is why Finder couldn't find it because it was in the .app