# Bug with Canvas Looks "draw line" function, with reproduceable demo

**URL:** https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052
**Category:** Issues / Bugs
**Tags:** canvas, bug, gaming, draw
**Created:** [May 23, 2025, 3:56pm UTC](https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052 "2025-05-23T15:56:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![james.newton-freelan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@james.newton-freelan](https://community.thunkable.com/u/james.newton-freelan)
#### Post date: [May 23, 2025, 3:56pm UTC](https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052/1 "2025-05-23T15:56:52Z")

</div>

> **[Thunkable](https://x.thunkable.com/projectPage/68308942cee597ba445d1a50)**

As shown in the project linked above, the built-in “draw line” function fails if the inputs for x and y are provided by parameters or variables.

---

<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: [May 23, 2025, 5:15pm UTC](https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052/2 "2025-05-23T17:15:08Z")

</div>

It does this if I rename the variables to remove the numbers:

**(Ignore the `set Debug's Text` blocks… I haven’t updated those)**

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/1/5110bfe35aebb88d3d067fee4da4e975a8083587.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/2/e27db239c03a822a889f92d30cb37174386f569c.png)

Turns out that wasn’t the problem though. Because I renamed the function variables again to add numbers back in and it still draws a straight vertical line:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/7/4758d8d85873b7f9ef929dc382f48c602dbeb28f.png)

So I suspect something got corrupted related to your original function variables.

---

<div class="post-metadata">

### Author: ![james.newton-freelan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@james.newton-freelan](https://community.thunkable.com/u/james.newton-freelan)
#### Post date: [May 23, 2025, 5:22pm UTC](https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052/3 "2025-05-23T17:22:43Z")

</div>

It looks like the problem occurs when the local variable or parameter has the same name as parameter used by the “draw line” function.

If you change your “x1New”-style variable names back to “x1”, the problem continues.

---

<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: [May 23, 2025, 10:02pm UTC](https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052/4 "2025-05-23T22:02:21Z")

</div>

> [@james.newton-freelan](#):
>
> It looks like the problem occurs when the local variable or parameter has the same name as parameter used by the “draw line” function.

That’s probably true. I’ll move this to the bugs category.

---

<div class="post-metadata">

### Author: ![james.newton-freelan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@james.newton-freelan](https://community.thunkable.com/u/james.newton-freelan)
#### Post date: [May 26, 2025, 6:56am UTC](https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052/5 "2025-05-26T06:56:46Z")

</div>

Can I delete my original demo now? Do you have your own copy so that you can test when this bug has been fixed?

---

<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: [May 26, 2025, 7:16pm UTC](https://community.thunkable.com/t/bug-with-canvas-looks-draw-line-function-with-reproduceable-demo/3859052/6 "2025-05-26T19:16:57Z")

</div>

I don’t work for Thunkable. I’m a customer like you but I have been on the forums and gained trust so I have some moderator functions available to me.

When you share a project link, it creates a completely separate project file for anyone who clicks on the link. So you’re welcome to delete your demo if you no longer need it but I would recommend – if you have a license that includes support – to provide it to the Thunkable Staff for review.
