Hi all,
I know that this topic has come up multiple times, but I'm having trouble with it in my app:
I've worked out a simple enough level editor for my puzzle game idea. So far I've had no issues saving, using a dictionary that writes out JSON through the NodeWebkit object. I look at the JSON and it tracks.
However, I can't for the life of me get the AJAX object to not error when loading the file back in. I should be able to, while previewing in Node-Webkit, load an arbitrary file, right? Here's how the logic looks:
<img src="http://www.komakant.com/construct2_post_images/file_save1.PNG" border="0" />
Which calls this function, where Param(0) is the JSON string, Param(1) is the offset in X, Param(2) is offset in Y. The offsets are there because I haven't figured out a simple way to save arrays of objects; instead, I'm using a "pointer" object, moving it to a position on the screen, and then subtracting the offset to determine which tile the X/Y coordinate is choosing. If that's confusing, imagine the tiles start from 0,0 and that the offsets are 0.
<img src="http://www.komakant.com/construct2_post_images/file_save2.PNG" border="0" />
So, I added a text object to debug, and I'm finding that the NodeWebkit object's ChosenPath is coming back empty after picking the file I saved out. Either that, or something is erroring along the way. What am I doing wrong here?
Thanks in advance!