# Mouse clicked with arrays issue (wolves and lambs)

**URL:** <https://discourse.processing.org/t/mouse-clicked-with-arrays-issue-wolves-and-lambs/40807>\
**Category:** Beginners\
**Tags:** homework\
**Created:** [February 2, 2023, 8:15pm UTC](https://discourse.processing.org/t/mouse-clicked-with-arrays-issue-wolves-and-lambs/40807 "2023-02-02T20:15:26Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [February 3, 2023, 12:21am UTC](https://discourse.processing.org/t/mouse-clicked-with-arrays-issue-wolves-and-lambs/40807/21 "2023-02-03T00:21:15Z")

</div>

> [@andprocessing](#):
>
> ```auto
> for(int contadorL=0;contadorL<n;contadorL++){
> loboX[contadorL]=int(random(0,677));
> loboY[contadorL]=int(random(100,677)); //wolves
> 
> ```

As I said replace n by nlobo

---

<div class="post-metadata">

**Author:** ![andprocessing](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@andprocessing](https://discourse.processing.org/u/andprocessing)\
**Post date:** [February 3, 2023, 12:24am UTC](https://discourse.processing.org/t/mouse-clicked-with-arrays-issue-wolves-and-lambs/40807/22 "2023-02-03T00:24:31Z")

</div>

ay I’m so sorry, my bad! I didn’t understand what you were saying!

Now it works, I seriously can’t thank you enough for helping me, you literally saved my life haha 😃

[Previous page](https://discourse.processing.org/t/mouse-clicked-with-arrays-issue-wolves-and-lambs/40807.md?page=1)
