How do I save to created folder?

Get help using Construct 2

Post » Tue Apr 18, 2017 10:34 am

I have created a game in which a folder is created using

>NWJs.Userfolder

As to save to the player user folder. I have created a folder in this folder called saves but i'm not sure how to save a file into that folder.

(this is not asking how to write to a external file just how i save to a subfolder within nwjs.userfolder.

Thanks.
B
5
S
1
Posts: 65
Reputation: 507

Post » Tue Apr 18, 2017 10:46 am

If I understand your question properly... you should be able to write any file path into the nwjs save function. The only issue will be if you try to save to any system protected folders (like windows directory) but should be fine anywhere else.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Tue Apr 18, 2017 10:51 am

How do i determine the sub folder? Just with a "\" ?
Tried with an "&" but didn't change the path.


Thanks
B
5
S
1
Posts: 65
Reputation: 507

Post » Thu Apr 20, 2017 4:36 am

It should be something like:

NWjs.UserFolder & "\example\test\filename.txt"

make sure you put the quotation marks around the path, and begin with backslash. You should also be able to just straight up put a path in there like "C:\myfolder\whatever.file"

Hopefully this helps :)

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Fri Apr 21, 2017 1:18 pm

Cheers Buddy.
Decided in the end just to save directly to NWJS.Appfolder instead as the game being marketed at schools and stuff and they probably not happy to have stuff saved in different folders.

Thanks a lot though.
B
5
S
1
Posts: 65
Reputation: 507


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, Sup with that? and 55 guests