# Type string number image not assignable to type string

**URL:** https://forum.makecode.com/t/type-string-number-image-not-assignable-to-type-string/28957
**Category:** Arcade
**Tags:** game
**Created:** [May 26, 2024, 1:11am UTC](https://forum.makecode.com/t/type-string-number-image-not-assignable-to-type-string/28957 "2024-05-26T01:11:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![technonux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/technonux/32/7924_2.png) [@technonux](https://forum.makecode.com/u/technonux)
#### Post date: [May 26, 2024, 1:11am UTC](https://forum.makecode.com/t/type-string-number-image-not-assignable-to-type-string/28957/1 "2024-05-26T01:11:33Z")

</div>

> **[creature catchers](https://arcade.makecode.com/S19222-79320-77437-96427)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/4a653a0baf079855ced522040c15819801eb37e7.png)  
how can i store an array of multiple types

---

<div class="post-metadata">

### Author: ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)
#### Post date: [May 26, 2024, 9:03pm UTC](https://forum.makecode.com/t/type-string-number-image-not-assignable-to-type-string/28957/2 "2024-05-26T21:03:41Z")

</div>

You should initialize an array with some dummy values of the types you want to use. Then you can empty the array and makecode will recognise it as an array of those types. Then you can add any of those types to the array. Here’s a demo

> **[test](https://arcade.makecode.com/S27241-44754-01062-37234)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![technonux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/technonux/32/7924_2.png) [@technonux](https://forum.makecode.com/u/technonux)
#### Post date: [May 27, 2024, 6:47pm UTC](https://forum.makecode.com/t/type-string-number-image-not-assignable-to-type-string/28957/3 "2024-05-27T18:47:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a0f5fda8e2692031643fa07c09fefedbf3a4ec94.png)  
i tried
