# Code Block warning

**URL:** <https://forum.dynamobim.com/t/code-block-warning/29207>\
**Category:** Uncategorized\
**Created:** [December 3, 2018, 2:36pm UTC](https://forum.dynamobim.com/t/code-block-warning/29207 "2018-12-03T14:36:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomas.miskinis](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@tomas.miskinis](https://forum.dynamobim.com/u/tomas.miskinis)\
**Post date:** [December 3, 2018, 2:36pm UTC](https://forum.dynamobim.com/t/code-block-warning/29207/1 "2018-12-03T14:36:52Z")

</div>

Hi Dynamo community,

I am very fresh in Dynamo and have a question for you.  
I used to work on previous version of Dynamo with this script and it was working fine. Unfortunately, after Dynamo update to version 2.0.1 Code Block gives me a **Warning: list indices must be numeric** , which was not a case before and now it does’t create a required list anymore. a,b & c indices are numeric values which need to create a new list based on the elements list.  
What do I need to change so it works again?

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/9/a9f643a11f752e742f9605c97fd6e272f9f7585c.png)

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [December 3, 2018, 2:40pm UTC](https://forum.dynamobim.com/t/code-block-warning/29207/2 "2018-12-03T14:40:15Z")

</div>

Hi 🙂

In Dynamo 2.0, all the indices of a list must be of `int` type.  
I think you could use the Dictionary structure to your benefit :

[http://primer.dynamobim.org/en/09\_Dictionaries/9\_Dictionaries-In-Dynamo.html](http://primer.dynamobim.org/en/09_Dictionaries/9_Dictionaries-In-Dynamo.html)

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [December 3, 2018, 2:42pm UTC](https://forum.dynamobim.com/t/code-block-warning/29207/3 "2018-12-03T14:42:32Z")

</div>

this can help also  
[http://dynamobim.org/to-dynamo-2-0-and-beyond/](http://dynamobim.org/to-dynamo-2-0-and-beyond/)

---

<div class="post-metadata">

**Author:** ![tomas.miskinis](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@tomas.miskinis](https://forum.dynamobim.com/u/tomas.miskinis)\
**Post date:** [December 4, 2018, 8:42am UTC](https://forum.dynamobim.com/t/code-block-warning/29207/4 "2018-12-04T08:42:29Z")

</div>

Thank you guys
