[SOLVED] Issue with loading a Tiled map following the tutorial using loadMapFromArray()

  • I can't seem to figure this issue out. The error log is not very descriptive. I'll post the error and what I believe to be the offending code and if anyone needs to see more then just ask. Please help me, I really like haxeflixel but this is very frustrating.

    Line 24 is the line with the loadMapFromArray Call

    Edit: I'm using Sublime Text

    	_map = new TiledMap(AssetPaths.map__tmx);
    	_mWalls = new FlxTilemap();
    	_mWalls.loadMapFromArray(cast(_map.getLayer("walls"), TiledTileLayer).tileArray, _map.width, _map.height, AssetPaths.tiles__png, _map.tileWidth, _map.tileHeight, FlxTilemapAutoTiling.OFF, 1, 1, 3);
    	_mWalls.setTileProperties(2, FlxObject.NONE);
    	_mWalls.setTileProperties(3, FlxObject.ANY);

    And the Error:

    export/windows/neko/haxe/ApplicationMain.hx:205: characters 57-75 : Warning : Use programPath instead
    export/windows/neko/haxe/ApplicationMain.hx:80: characters 47-65 : Warning : Use programPath instead
    AL lib: (EE) alc_cleanup: 1 device not closed
    data is missing attribute encoding
    Called from C:\HaxeToolkit\haxe\std/haxe/xml/Fast.hx line 56
    Called from flixel/addons/editors/tiled/TiledTileLayer.hx line 153
    Called from flixel/addons/editors/tiled/TiledTileLayer.hx line 178
    Called from PlayState.hx line 24
    Called from flixel/FlxGame.hx line 649
    Called from flixel/FlxGame.hx line 739
    Called from flixel/FlxGame.hx line 689
    Called from flixel/FlxGame.hx line 554
    Called from openfl/_legacy/events/EventDispatcher.hx line 98
    Called from openfl/_legacy/display/DisplayObject.hx line 182
    Called from openfl/_legacy/display/DisplayObject.hx line 161
    Called from openfl/_legacy/display/DisplayObjectContainer.hx line 286
    Called from openfl/_legacy/display/Stage.hx line 1103
    Called from openfl/_legacy/display/Stage.hx line 351
    Called from openfl/_legacy/display/Stage.hx line 1084
    Called from openfl/_legacy/display/Stage.hx line 430
    [Finished in 63.5s]

    Edit 2: Here is the TMX file I had figured the issue was something with the map missing something but I'm not sure what it could be. I've tried using a regular map layer instead of an entities layer as well and that didn't work.

    Also, here is the tiles image, I'm just using the one from the tutorial.

  • administrators

    The .tmx file would help.

    data is missing attribute encoding suggests that Flixel's Tiled loader expects it to contain an attribute it doesn't have.

  • This post is deleted!

  • @Gama11 I've edited my post to include the TMX file.

  • administrators

    It works ok when you change the encoding, for instance to Base64:

  • @Gama11 OH wow I feel dumb. Thank you very much. I feel as though that should be stated in the tutorial.

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.