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:
// ######################################## Build Levels
build_lvl:
textPos = 0
for y = 1 to lvlY
for x = 1 to lvlX
textPos = textPos + 1
blockNUM$ = Mid(lvl$[lvlNUM],textPos,1)
if blockNUM$ <> "0"
for i = 1 to numberLvlBlocks
if blockNUM$ = lvlBlock[i].sLevelSection
blockSprite=CreateSprite(lvlBlock[i].iImage)
endif
next i
SetSpriteSize(blockSprite, blockSizeX#, blockSizeY#)
lvl_map[x,y]=blockSprite
SetSpritePosition( lvl_map[x,y], (x-1) * blockSizeX#, (y-1) * blockSizeY# )
else
lvl_map[x,y]=0
endif
next x
next y
return
// ######################################## Load all Levels
readLevels:
for i = 0 to totalLevels
OpenToRead(1, "lvl_" + Str(i) + ".txt")
for n = 1 to lvlX * lvlY
if n = 1
l$ = ReadString(1)
else
l$ = l$ + ReadString(1)
endif
next n
lvl$[i] = l$
CloseFile ( 1 )
next i
return
// ######################################## Save Edited Level
saveLevel:
OpenToWrite(1,"lvl.txt")
for y = 1 to lvlY
for x = 1 to lvlX
if lvl_map[x,y] <> 0
blockSpriteImage = GetSpriteImageID(lvl_map[x,y])
for i = 1 to numberLvlBlocks
if blockSpriteImage = lvlBlock[i].iImage
WriteString(1, lvlBlock[i].sLevelSection)
endif
next i
else
WriteString(1, "0")
endif
next x
next y
CloseFile ( 1 )
return