# Enemies randomly being set to numbers, checked every line of code and the error persists, i'm going to go insane

**URL:** https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861
**Category:** Help
**Tags:** extension, game
**Created:** [July 9, 2026, 11:28pm UTC](https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861 "2026-07-09T23:28:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Cheesey.Borger](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@Cheesey.Borger](https://forum.makecode.com/u/Cheesey.Borger)
#### Post date: [July 9, 2026, 11:28pm UTC](https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861/1 "2026-07-09T23:28:50Z")

</div>

making a small game for a school project, just installed the sprite wall engine extension and it works like a charm.

now, why the actual HELL (would’ve sworn if i was sure it’s allowed on here lol) are my sprites being set to numbers out of the blue? i’ve not added a SINGLE block setting them to a number.

for context, how the enemy system works is that there are 10 enemies in each wave. the enemies are all assigned their own HPs, types and status (whether they’re dead or not) as a whole seperate variable, and therefore should have no impact on the actual enemy sprite variable. the game is a work in progress, so speed will most likely also be added as a variable.

i’ve scoured all my code. yes, it’s clunky, but i assure you, i’ve looked FAR AND WIDE, SKIMMING **EVERY INDIVIDUAL LINE** and i haven’t found a SINGLE line setting my sprites to numbers, but the game doesn’t run because “.x can’t be assigned to type number” and i can’t get a type number to do the action “follow” or anything. well, if i’ve looked at ALL my code and not a single line sets my enemies to numbers, WHY THE ACTUAL **HECK** IS IT GIVING ME THAT GODDAMN ERROR?

funny thing is, it only started when i installed the extension a day ago and came back to work more on it. even FUNNIER is that the error only seems to be effecting the last 8 enemies, and enemies 1 and 2 are completely unaffected. **WHY.** just to let yall know, every singular line of code effecting those last 8 enemies are DIRECTLY COPYPASTED from enemy1’s code, and after facing a similar problem before, i have COMPLETELY ERADICATED ANY SIGN OF A SPRITE BEING SET TO A NUMBER. and yet the error still persists.

why, makecode, have you damned me to this loop of getting errors, trying to debug, and still getting more errors? it might sound like i’m exaggerating, but i’m sure that some people will understand the sheer frustration i’m going through right now. obviously, i’m not really going insane, but i MAY AS WELL BE WITH HOW MUCH THIS IS P-ING ME OFF!!!

if you’ve had experience with something like this, PLEASE share your experience and offer some advice on how to solve this IRRITATING ERROR

---

<div class="post-metadata">

### Author: ![TheEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theearth/32/34579_2.png) [@TheEarth](https://forum.makecode.com/u/TheEarth)
#### Post date: [July 10, 2026, 3:51pm UTC](https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861/2 "2026-07-10T15:51:41Z")

</div>

Could you post the games code if so maybe someone like @WoofWoof could help because explaining the error might not be enough but I think I know what the error is from after switching the code to blocks and back mostly arrays tho

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [July 10, 2026, 3:59pm UTC](https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861/3 "2026-07-10T15:59:41Z")

</div>

please send your project!

---

<div class="post-metadata">

### Author: ![top\_hat\_lord](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/top_hat_lord/32/33469_2.png) [@top\_hat\_lord](https://forum.makecode.com/u/top_hat_lord)
#### Post date: [July 10, 2026, 4:01pm UTC](https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861/4 "2026-07-10T16:01:47Z")

</div>

first time?(Joke)

I recommend you try making a new project and remaking the specific part of your code for the enemies. then make another project that’s a copy pasted version of your enemy code. simply compare and see what’s going on.

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [July 11, 2026, 2:03am UTC](https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861/5 "2026-07-11T02:03:54Z")

</div>

Share your code. The sprite walls extension is a user created extension, so maybe it is doing something weird or has some variable that aren’t properly inside the extension namespace. I believe if that is the case the author is @Sonicblaston. If you post the project I’ll try to take a look at it.

---

<div class="post-metadata">

### Author: ![AlexTheGoober63](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexthegoober63/32/35080_2.png) [@AlexTheGoober63](https://forum.makecode.com/u/AlexTheGoober63)
#### Post date: [July 13, 2026, 5:12pm UTC](https://forum.makecode.com/t/enemies-randomly-being-set-to-numbers-checked-every-line-of-code-and-the-error-persists-im-going-to-go-insane/44861/6 "2026-07-13T17:12:11Z")

</div>

I got 1 answer that could probably save you from the torture…

1. if the extension is causing the problem, go to the creator of that extension and threat them and force them to fix it so that the problem will be solved (hopefully)
2. Or if the extension is not so important, try to delete it, and try to find a way around it or a substitute for the extension.

now I got two questions:

1. What are you coding by? Blocks? Python? Javascript?
2. Is the H, E double hockey sticks word allowed on the forums? If so, then I am going to have a fun time making my game hehe…
