Hey,
I am attempting to store my levels in files, but for some reason they don't load correctly... This is my read and write code:
Save:
Open To Write 1, "Test.lvl"
Write Byte 1, PlayerSpawnX
Write Byte 1, PlayerSpawnY
Write Byte 1, MaxXTiles
Write Byte 1, MaxYTiles
Write Byte 1, TileSize
For X = 0 To MaxXTiles
For Y = 0 To MaxYTiles
Write Byte 1, TileSprite(X, Y)
Write Byte 1, TileType(X, Y)
Write Byte 1, TileDepth(X, Y)
Next Y
Next X
Close File 1
Return
Load:
Open To Read 1, "Test.lvl"
Read Byte 1, PlayerSpawnX
Read Byte 1, PlayerSpawnY
Read Byte 1, MaxXTiles
Read Byte 1, MaxYTiles
Read Byte 1, TileSize
For X = 0 To MaxXTiles
For Y = 0 To MaxYTiles
Read Byte 1, TileSprite(X, Y)
Read Byte 1, TileType(X, Y)
Read Byte 1, TileDepth(X, Y)
Next Y
Next X
Close File 1
Return
Matt
Position Object Game Master1330, Object Position X(Reader), Object Position Y(Reader), Object Position Z(Reader) - 5
Hide Object Game Master1330