'Index 2 exceeds the maximum tile index of 0. Please verify the Tile (1) and Range (1) parameters

my code in haxe can't draw the map on the screen, see here

map = new FlxOgmo3Loader(AssetPaths.maparafinhabastos__ogmo, AssetPaths.room_001__json);

walls = map.loadTilemap("assets/tiles.png", "walls");

walls.follow();

walls.setTileProperties(1, NONE);
walls.setTileProperties(2, ANY);
walls.setTileProperties(3, NONE);

add(walls);

and the error is:

Called from PlayState.hx line 28 Called from flixel/tile/FlxBaseTilemap.hx line 751 Uncaught exception - Index 2 exceeds the maximum tile index of 0. Please verify the Tile (1) and Range (1) parameters.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source