Posted: 4th Sep 2011 1:41
I managed to install the AppGameKit Player in my iPad and I can deploy my game to it. However I'm facing a problem.

My game has a subfolder under media called "levels/1.txt".

This file is read every level to set my sprites position on the stage. It works on my PC, I can see the sprites properly placed, etc...

On the iPad, the sprites that are dependend on this file don't show up. Actually when I close my game on the player, it shows: "Last error. Could not read file".

Here is the way I'm open the file and read the file:

+ Code Snippet
    fileName$ = "levels\" + str(level) + ".txt"
    fileHandle = OpenToRead(fileName$)
    While FileEOF(fileHandle)=0
        line$ = ReadLine(fileHandle)
    EndWhile
    CloseFile(fileHandle)


As I said, it works on my PC, but not on iOS. The "level" variable is an integer passed as parameter, and I checked the filename contains: "levels\1.txt".

My local directory structure is:

gamedir -> media -> levels

Anyone has an idea what is happening?

Thanks
Posted: 4th Sep 2011 2:04
I actually just got done fixing this issue.

Change
+ Code Snippet
fileName$ = "levels\" + str(level) + ".txt"


to

+ Code Snippet
fileName$ = "levels/" + str(level) + ".txt"


Back-slashes don't seem to work with the IOS player, the simple solution is to just use forward-slashes