# Help with lever code

**URL:** https://forum.makecode.com/t/help-with-lever-code/30751
**Category:** Arcade
**Tags:** game
**Created:** [September 20, 2024, 8:35pm UTC](https://forum.makecode.com/t/help-with-lever-code/30751 "2024-09-20T20:35:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![toxic\_lj](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@toxic\_lj](https://forum.makecode.com/u/toxic_lj)
#### Post date: [September 20, 2024, 8:35pm UTC](https://forum.makecode.com/t/help-with-lever-code/30751/1 "2024-09-20T20:35:47Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/d/3/d3d261899e4e08deddc1ab03e5614e90397eb12a.png)  
Hey guys Im trying to make it so this code can flick a lever when my sprite is beneath the lever block. I feel like im onto something but its not working. Thanks!

---

<div class="post-metadata">

### Author: ![anon30657772](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@anon30657772](https://forum.makecode.com/u/anon30657772)
#### Post date: [September 21, 2024, 7:27pm UTC](https://forum.makecode.com/t/help-with-lever-code/30751/2 "2024-09-21T19:27:20Z")

</div>

Hmmm that’s interesting. I _[recreated a similar case as yours](https://makecode.com/_gP82FFb9UDLj)_ and it seems the equals block doesn’t work properly when using tilemap locaiton blocks. When I separated the locations into columns and rows, it works though so maybe you should do that for now until a better solution is found.

> **Here's the alternate comparison code that worked for me:**
>
> ![tempSolution](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/a/d/ad1678c41957ec3558c68f5a263121ab60cb1a80.png)
