# Problem loading maps from Latest Tiled version - Solution found

**URL:** <https://forums.solar2d.com/t/problem-loading-maps-from-latest-tiled-version-solution-found/329130>\
**Category:** Million Tile Engine\
**Created:** [October 8, 2014, 2:20am UTC](https://forums.solar2d.com/t/problem-loading-maps-from-latest-tiled-version-solution-found/329130 "2014-10-08T02:20:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve67](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@steve67](https://forums.solar2d.com/u/steve67)\
**Post date:** [October 8, 2014, 2:20am UTC](https://forums.solar2d.com/t/problem-loading-maps-from-latest-tiled-version-solution-found/329130/1 "2014-10-08T02:20:08Z")

</div>

Dyson and others,

If you are getting the following error when you try to load a new map:

runtime error:

File: mte.lua

Line: 8099

‘for’ limit must be a number

stack traceback:

mte.lua:8099: in function ‘loadMap’

main.lua:205: in main chunk

&nbsp;it is because the latest version of Tiled Does not put the width and height attributes inside of the object layer.

&nbsp;So simply add the following:

width=“100” height=“100” &nbsp;

into the line \<objectgroup name=“Object Layer 1”

This will allow your map to load properly In the Corona emulator.

---

<div class="post-metadata">

**Author:** ![steve67](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@steve67](https://forums.solar2d.com/u/steve67)\
**Post date:** [October 8, 2014, 2:33am UTC](https://forums.solar2d.com/t/problem-loading-maps-from-latest-tiled-version-solution-found/329130/2 "2014-10-08T02:33:41Z")

</div>

So I realize that when you update the map and save it in Tiled, it will blow away that little tweak made to the file anyways.

&nbsp;Much better solution is just add two properties to your objects layer inside of Tiled:

width = \<number of tiles wide\>

height = \< number of tiles high\>

this works

---

<div class="post-metadata">

**Author:** ![greg\_brady](https://forums.solar2d.com/user_avatar/forums.solar2d.com/greg_brady/32/430_2.png) [@greg\_brady](https://forums.solar2d.com/u/greg_brady)\
**Post date:** [October 15, 2014, 3:26pm UTC](https://forums.solar2d.com/t/problem-loading-maps-from-latest-tiled-version-solution-found/329130/3 "2014-10-15T15:26:59Z")

</div>

Thanks Steve, good to know!

Greg

---

<div class="post-metadata">

**Author:** ![steve67](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@steve67](https://forums.solar2d.com/u/steve67)\
**Post date:** [October 8, 2014, 2:33am UTC](https://forums.solar2d.com/t/problem-loading-maps-from-latest-tiled-version-solution-found/329130/4 "2014-10-08T02:33:41Z")

</div>

So I realize that when you update the map and save it in Tiled, it will blow away that little tweak made to the file anyways.

&nbsp;Much better solution is just add two properties to your objects layer inside of Tiled:

width = \<number of tiles wide\>

height = \< number of tiles high\>

this works

---

<div class="post-metadata">

**Author:** ![greg\_brady](https://forums.solar2d.com/user_avatar/forums.solar2d.com/greg_brady/32/430_2.png) [@greg\_brady](https://forums.solar2d.com/u/greg_brady)\
**Post date:** [October 15, 2014, 3:26pm UTC](https://forums.solar2d.com/t/problem-loading-maps-from-latest-tiled-version-solution-found/329130/5 "2014-10-15T15:26:59Z")

</div>

Thanks Steve, good to know!

Greg
