Game Development Community

Saving information to a File

by Jason Darby · in iTorque 2D · 04/29/2010 (3:31 pm) · 1 replies

In my 1.2 created game, we saved the highscores to a file. This all works great no problems.

With 1.3.1 this no longer works (yay lots of fun)... it now says that it cannot find the file (message below)

Adding new Highscore to SimSet
New Highscore Added
Sorting Highscores
saving updated highscores
Saving
getPrefsPath - Filename (../Documents/Castle Software Ltd/Whack Em World Tour Lite/game/scripts/highscores.txt) cannot be relative.

So what has changed? How do i fix this? The original path to the save file is shown below:

Path = getAppDocumentsPath() @ "~/scripts/highscores.txt";

Where do i now save it?

Many thanks

Jason

About the author

Computer games book author, have written 6 game creation books, published by Cengage Course Technology. Owner of Arcade website www.madword.com and Castle software.