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

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

3 Likes

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

2 Likes

please send your project!

1 Like

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.