Why is grid creation via OGMO bitstring standard formatting glitchy (for me at least)?


(Pedro Mendes) #1

Hello people. I am quite confused right now. I exported a grid layer from OGMO editor v2+ as a bitstring and the layer looks like this:


<Grid exportMode="Bitstring">1111111111111111111111111111111111111111 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1111100000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000011110000000000000000000000000001 1000000011110000000000000000000000000001 1000000011110000000000000000000000000001 1000000011111000000000000000000000000001 1000000011111000001111000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000111110000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000000000001 1000000000000000000000000000000100000001 1000000000000000001000000000011100000001 1000000000000000001000000000111100000001 1000000000000000001000000001111100000001 1000000001000000001000000011111100000001 1000000001000000001000000111111100000001 1111111111111111111111111111111111111111</Grid>


This is my grid loading method parameters:

_mapGrid.loadFromString(mapXML.Grid, "", "/n");

The last parameter, “/n”, isn’t working properly, because only the first row gets loaded. To make it work correctly right now, i have to join the rows on a single line and separate them with a comma, wich is very impratical since I have to do it everytime I change the map, etc…

So does anyone know what parameter works in place of “/n”?


(rostok) #2

shouldn’t it be \n?