• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Possible file permission error

W

whale_cancer

Guest
Hello!

I am getting the following error in the compiler window:

Code:
Error! not allowing save with filename 'C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Up.png'
Adding C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Up.png as sprite # -1
Error! not allowing save with filename 'C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Left.png'
Error! not allowing save with filename 'C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Down.png'
Error! not allowing save with filename 'C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Right.png'
The .png files in question are generated by another part of my program, so it seems like I should have read/write permission in that location. That being said, I don't know why it is even trying to save the .pngs? I am just trying to turn them into sprites.

The .ini file in question:
Code:
[Sprites]
Up="C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Up.png"
Right="C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Right.png"
Down="C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Down.png"
Left="C:\Users\Whale Cancer\AppData\Local\gm_ttt_18915\gm_ttt_50081\Zero\Left.png"
And my actual code:
Code:
//Set Sprites
ini_open('Zero/Config.ini')
tS = ini_read_string('Sprites','Up', '')
sprite_up = sprite_add(tS, 4, false, false, 0, 2);
show_debug_message('Adding '+tS+' as sprite # '+string(sprite_up));

tS = ini_read_string('Sprites','Left', '')
sprite_left = sprite_add(tS, 4, false, false, 0, 2);

tS = ini_read_string('Sprites','Down', '')
sprite_down = sprite_add(tS, 4, false, false, 0, 2);

tS = ini_read_string('Sprites','Right', '')
sprite_right = sprite_add(tS, 4, false, false, 0, 2);
ini_close();
Any help appreciated.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
You can't simply use absolute paths like that, there are sandboxing rules (see the manual).

Might want to move the files to "appdata/local/(game name)" and use relative paths ("Zero\Up.png") instead.
 
W

whale_cancer

Guest
You can't simply use absolute paths like that, there are sandboxing rules (see the manual).

Might want to move the files to "appdata/local/(game name)" and use relative paths ("Zero\Up.png") instead.
Hmm, yeah, relative paths work.

But it is not intuitive at all that I can save with absolute paths but not load with them.
 
Top