# Code block not calculating zero?

**URL:** <https://forum.dynamobim.com/t/code-block-not-calculating-zero/112879>\
**Category:** Uncategorized\
**Created:** [October 29, 2025, 7:49pm UTC](https://forum.dynamobim.com/t/code-block-not-calculating-zero/112879 "2025-10-29T19:49:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [October 29, 2025, 7:49pm UTC](https://forum.dynamobim.com/t/code-block-not-calculating-zero/112879/1 "2025-10-29T19:49:37Z")

</div>

hello, is there a reason the code block is not calculating zero? this list.count node is calling 0 from an empty list as intended, but when put this zero into this code block as follows it is failing ‘null’ and I even tried to see if it was a good value as pulling it as an integer and refeeding it but it still fails. Whats going on here and how do i fix it? Please advise

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/2/c24d9917f9ee0e843f162c653bddd9f448cb7cfd.png)

---

<div class="post-metadata">

**Author:** ![DevinLJackson](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@DevinLJackson](https://forum.dynamobim.com/u/DevinLJackson)\
**Post date:** [October 29, 2025, 9:17pm UTC](https://forum.dynamobim.com/t/code-block-not-calculating-zero/112879/2 "2025-10-29T21:17:47Z")

</div>

If you look at the syntax of the code block, you are basically saying “create a range that starts at 97, ends at 96, with steps of 1”.

It looks like you have your X/N inputs backwards. Swapping them would give you “create a range that starts at 1, ends at 96, with steps of 1”.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/5/754e0811175f40b29b2a106f741394bff5536a5e.jpeg)
