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 / Bug: 2.0.16 : Reading and Writing files ??

Author
Message
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 14th Jan 2016 20:17
Not sure if there is a bug or not with reading and writing files since the update. I am using the Mac and have been creating a map editor and was going to save the file but for some reason I have not been able to find the file anywhere on the computer even the place where it normally saves to.
I then tried my Platypus game which I had not changed at all and worked previous on 15d reading in a level to build the platforms etc and it all messed up. The platforms were all over the place.

This is really odd so I changed back to 15d and it still did the same!!!

Any ideas??

Here is a section of code from my Platypus game for reading and writing files:

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th Jan 2016 21:03
Have you installed any OS updates recently? It could be that the OS is preventing the writing of a file to certain locations for security reasons. Are you using SetRawWritePath by any chance? Does it work if you comment that out and write to the default location, using GetWritePath to double check its location? I don't recall any changes being made to file saving/loading in 2.0.16
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 15th Jan 2016 12:59
My OS updated to El Capitan 10.11.2 in December and I haven't been using the SetRawWritePath command but I have found what had happened.

I created a shortcut to the folder that AppGameKit saves to in order to make it easier to find the files and when I saved the file from my map editor it wasn't in this folder which was odd. I thought there was a problem with saving the file but I did a search on the Mac for the file anyway and it couldn't find it.
It turns out that the update of the Mac must have changed the save file location as GetWritePath showed a different folder it was saved to and the file was there, I have now created a new shortcut to this folder.
As the save file was called the same name as the level file for the platform game, when I pressed run for the platform game it must have loaded the file from the map editor instead of the one for the platform game in the media folder because it must look to see if the file is there first before the media folder. As the data in the file was different for both files the level was all messed up when loaded in.
I took the file out of the folder and when I run the platform game this time because the other file wasn't there it worked correctly because it loaded the correct file from the media folder.

So GetWritePath is a good command to use for checking file errors etc

.....and in short there is no bug and again Apple messing around with things causing problems.


Cheers for the advice Paul because I forgot about GetWritePath and would have been messing with this for ages!
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Login to post a reply

Server time is: 2024-11-17 02:33:48
Your offset time is: 2024-11-17 02:33:48