# Help With Error, and to Reduce the code

**URL:** <https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, lists, horizontalarrange\
**Created:** [August 6, 2021, 6:51am UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812 "2021-08-06T06:51:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 6, 2021, 6:51am UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/1 "2021-08-06T06:51:26Z")

</div>

Hey guys hows it going?  
So 2 things

 ![shot-2021-08-06_01-34-32](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/3/c3afe45d2e84c18493a94c7415ad87e703c1dd9e.png)

1. There is a bunch of errors and I am not sure why, This Happened after I added a 2nd screen and moved everything over then ended up moving things back to screen 1 because i realized i didn’t nee the second screen

2. Is there a way to use a list or some sort of array, to arrange bricks, a set of 5 per row or something? I Have like 30 bricks i had to set the X and Y axis for. I feel like i can reduce the code.  
[Thunkable](https://x.thunkable.com/copy/747a313c36da1b3d31f9a8fd66640d61)

---

<div class="post-metadata">

**Author:** ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)\
**Post date:** [August 6, 2021, 6:56am UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/2 "2021-08-06T06:56:24Z")

</div>

> [@1negroup](#):
>
> There is a bunch of errors

Have you tried to select the components again from the Dropdown menu? If that doesn’t solve your problem, just disconnect and connect your blocks again with the yellow part.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 6, 2021, 8:29am UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/3 "2021-08-06T08:29:29Z")

</div>

Yes I have. Thank You. I did Reconnect and select The components from the dropdown menu. it didn’t work.

---

<div class="post-metadata">

**Author:** ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)\
**Post date:** [August 6, 2021, 8:32am UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/4 "2021-08-06T08:32:41Z")

</div>

That’s interesting, try the followings:

1. Select an another component from the Dropdown

2. Select the correct component from the Dropdown

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 7, 2021, 6:43pm UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/5 "2021-08-07T18:43:15Z")

</div>

I have done this as well. It still isnt working. i Feel like this should resolve it self since the components are correct

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [August 7, 2021, 6:45pm UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/6 "2021-08-07T18:45:43Z")

</div>

It worked for me to drag in a new `remove` block and select the same sprite. But I couldn’t get it to work with the existing `remove` blocks you have. You’ll have to replace them all. I’m not sure why that is. Same thing with the `set` blocks.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [August 7, 2021, 6:51pm UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/7 "2021-08-07T18:51:06Z")

</div>

Also, I think you can do something like this:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/0/c03e230590526c6404ec69901e38e8e5482ab624.png)

To set all sprite’s x positions to 110. And then you could use math blocks to set the y positions. It looks like you’re spacing them 60 pixels apart so it would be a matter of multiplying 60 by the sprite’s index (you’d need a counter variable or a loop that already has that) and adding whatever base value (y=0, y=50, wherever it starts). A bit more complicated but probably doable.

**Edit:** Just realized you’d not setting all brick x positions to 110. So you’ll need the more complicated math formula to achieve this.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 7, 2021, 7:59pm UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/8 "2021-08-07T19:59:06Z")

</div>

Thank You and that sucks.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 7, 2021, 8:02pm UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/9 "2021-08-07T20:02:33Z")

</div>

Thank You for The J List thing, I Think It should help

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 7, 2021, 8:43pm UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/10 "2021-08-07T20:43:39Z")

</div>

So i Did A Combination of both the steps and it worked.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/help-with-error-and-to-reduce-the-code/1433812/11 "2024-11-08T13:17:33Z")

</div>


