Jump to content
  • 0

Save broke in 32.26 (java.io.IOException: item load() read more data than save() wrote)


blindcoder

Question

java.io.IOException: item load() read more data than save() wrote (BCMapMod.Map)    at zombie.inventory.ItemContainer.load(ItemContainer.java:1344)    at zombie.characters.IsoGameCharacter.load(IsoGameCharacter.java:4621)    at zombie.characters.IsoPlayer.load(IsoPlayer.java:789)    at zombie.iso.IsoCell.LoadPlayer(IsoCell.java:5663)    at zombie.iso.IsoWorld.init(IsoWorld.java:1334)    at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:242)    at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:217)    at java.lang.Thread.run(Thread.java:745)

This happened while I was trying to load a save from IIRC 32.24 in the current 32.26.

I promise the BCMapMod did not change between versions :-(

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

How much data does that BCMapMod.Map item use?  The size of each item is saved with a 16-bit integer which works out to a limit of 32KB per item.  I notice map_p.bin is 5MB.  The size was < 0 which makes me think the item was > 32KB.

 

*cough* Oh...

The Map item can use a _lot_ of moddata. Didn't think there would be a limit on that.

-- ModData used:-- getModData()["BCMapMod"] = {--   [options] = { -- some options for this map--     [x] = 123,--     [y] = 123,--     [w] = 123,--     [h] = 123, -- position / dimensions of this map--     [zoom] = 8, -- zoomlevel--     [autoMoveMap] = true|false -- option for autoMoveMap--   },--   [range] = { -- a range identifier to restrict drawing to available paper space--     [freePaper] = int -- amount of unused paper in this map to use for additional cells--     [cellX] = {--       [cellY] = true -- if set and true, have paper for this cell--     }--   },--   [empty] = true|false, -- if this map is empty--   [x] = { -- xCoordinates of map, absolute--     [y] = { -- yCoordinates of map, absolute--       seen = true|false -- tile has been seen--       drawnBy = <string> -- "forename surname" of drawer, used internally--       draw = [ -- array of stuff to draw--         collideN = true|false -- has a wall on the north side--         collideW = true|false -- has a wall on the west side--         draw = <string> -- what object to draw at this tile--         desc = <string> -- description of tile, WIP--         color = { r = 0..1, g = 0..1, b = 0..1, a = 0..1} -- color to pass to drawTextureScaled--         street = {--           left = true|false--           right = true|false--           up = true|false--           down = true|fals   -- whether there's another street tile in--                                 given direction. WIP--         }--       ]--     }--   }
Link to comment
Share on other sites

Just to explain:

There's an array in the moddata which contains information about a specific tile (need NOT match the real game world).

So, for Muldraugh that might be an array of a few thousand wide and long.

Each element in that array is a string naming the texture to draw, with the color to use for the texture and an optional text description.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...