Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / 100% BUG! SetRawWritePath(GetReadPath())

Author
Message
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 20th May 2015 01:11
Ones you use:


it changes agk::GetWritePath() forever with agk::GetReadPath() !

JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 20th May 2015 09:57
That's exactly what it should do, surely?

<<It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.>> Dijkstra
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th May 2015 10:36
That's my understanding, it is doing exactly what you are telling it to do.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 20th May 2015 12:11
You're telling it to set the writepath to the readpath:
and then confirming that it has done exactly that with your print statements.


I can't see a bug. What were you expecting it to do?

V2 T1 (Mostly)
Uzmadesign
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th May 2015 13:02
I'm tagging myself in to this one - I'm fascinated to learn what was expected

AGK V2 user - Tier 1 (mostly)
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 20th May 2015 13:18
SetRawWritePath(GetWritePath()) - must turn my current folder to "C:\Users\UserName\AppData\Local\AGKApps\MyGame\". I need this for storing the save and setting data. So I'm always switching between SetRawWritePath(GetWritePath()) to write or read my saving data and SetRawWritePath(GetReadPath()) to load game content.
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 20th May 2015 13:30 Edited at: 20th May 2015 13:52
Now I understood what this function means.
But it doesn't work when I need to save my level to game folder(to .exe) and save player data to AppData folder.
I know how to avoid this, but it's really illogical...Probably just for me
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th May 2015 13:46 Edited at: 20th May 2015 13:49
the application folder is more or less a template.
you can load from but save belongs the documents or appdata folder.
means a user can not modify/overwrite app files by mistake.
i think its os design.
myself i like the freedom because other results ending in can't do.

AGK 108 (B)19 + AppGameKit V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th May 2015 15:17
When you read data it looks in the application folder. If it doesn't find the file here, it then checks the write path. You don't need to do anything special to make this happen.

When you write data, it writes to the write path. It never writes to the read path, because this will be protected on most platforms.

The default wite path is:

C:\Users\UserName\AppData\Local\AGKApps\AppName\

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-11-25 21:47:25
Your offset time is: 2024-11-25 21:47:25