# Trying to make a class with a tilemap, what type should i use

**URL:** https://forum.makecode.com/t/trying-to-make-a-class-with-a-tilemap-what-type-should-i-use/15981
**Category:** Help
**Tags:** game
**Created:** [October 24, 2022, 4:55pm UTC](https://forum.makecode.com/t/trying-to-make-a-class-with-a-tilemap-what-type-should-i-use/15981 "2022-10-24T16:55:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TakeTheL08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/takethel08/32/7018_2.png) [@TakeTheL08](https://forum.makecode.com/u/TakeTheL08)
#### Post date: [October 24, 2022, 4:55pm UTC](https://forum.makecode.com/t/trying-to-make-a-class-with-a-tilemap-what-type-should-i-use/15981/1 "2022-10-24T16:55:28Z")

</div>

I have tried running `game.splash(typeof assets.tilemap`level`)` where level is a valid tilemap in assets, but it returns Object.

I have tried putting Object type into `scene.setCurrentTilemap()`, but it does not work.

---

<div class="post-metadata">

### Author: ![TakeTheL08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/takethel08/32/7018_2.png) [@TakeTheL08](https://forum.makecode.com/u/TakeTheL08)
#### Post date: [October 24, 2022, 5:48pm UTC](https://forum.makecode.com/t/trying-to-make-a-class-with-a-tilemap-what-type-should-i-use/15981/2 "2022-10-24T17:48:43Z")

</div>

I have tried using type `TileMapData`, but it also did not work

---

<div class="post-metadata">

### Author: ![TakeTheL08](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/takethel08/32/7018_2.png) [@TakeTheL08](https://forum.makecode.com/u/TakeTheL08)
#### Post date: [October 24, 2022, 5:48pm UTC](https://forum.makecode.com/t/trying-to-make-a-class-with-a-tilemap-what-type-should-i-use/15981/3 "2022-10-24T17:48:46Z")

</div>

Nvm I solved it, just had to use `tiles.TileMapData`
