Makecode memes

Random, but does anyone know when the next game jam is?

1 Like

9 Likes

uhhhh GOOD MORNIGB EVERYOBE JEBDJDNEJRJS

2 Likes

Last ones are diabolical
I guess that includes me

1 Like

my grandmother literally sent me this today :sob:

13 Likes

october

1 Like

halloween i think

1 Like

15 Likes

10 Likes

:-1:
I do not endorse these cannibalistic actions, it’s a true shame of what this world has become, I have lost all hope in humanity

2 Likes

It better use the oldest language in its oldest form

1 Like


It seems @goldtopaz has put me in this topic more times than I have, so I’ll be fixing that… :upside_down_face:

16 Likes

Oh, you can treat numbers like Booleans?

2 Likes

Yes. In typescript, anything that’s 0, undefined, NaN, etc is treated as “false” in IF statements. That’s why an undefined sprite will be treated as False in an IF block, which lets you check if it exists!

5 Likes

This should have been brought to my attention ages ago to prevent me from creating about thirty variables to check if something exists.

4 Likes

Oof :sweat_smile: that’s gotta be annoying! I myself rarely run into this problem while coding… maybe because I rarely use many sprites? I use a lot of “for every sprite of kind…” loops, which avoids this issue entirely, or I use general state variables not solely for keeping track of sprites that also happen to prevent the issue.

3 Likes

The one game that this happens most to uses lots of sprite wich all do different things individually, so for over half a year ive been getting around failed cast on null errors with “Presence” variables wich i only set to true while their related sprite is on screen. This is helpful to know and should help avoid my 500 variables issue from now on.

2 Likes

for an even better check, i’d use @jwunderl’s arcade-sprite-utils which has a block that will tell you if a sprite is undefined/null or destroyed

8 Likes

That is wonderful to know, i will probably get to using it post-haste.

4 Likes

Makecoders when the mods take more than a 48 hour break from approving posts:

19 Likes