Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Reaping Fire Error


I FINALLY finished Reaping Fire and got the 60 second bonus. YAY! \o/ However, the second time I submitted it (yes, I got a bad seed and it failed the first time), the browser crashed and when I tried to run it again, it started giving this error. I did not change anything and this error wasn’t there before. The code runs fine. I can even submit it again and complete the level successfully buuuuut what’s up with this error? It won’t go away. It appears instantly when running the code, even when there are many coins present and obviously the item isn’t null.

Anyone have any ideas?


So from another completely different location I logged in and tried it again. Got the same error so I know it’s on the site, not my machine. But then the error went away as mysteriously as it appeared. Not sure what the heck happened but it’s gone now. I figure it must have had something to do with the browser crash. :confused:


Hi there,

You don’t check if the coin exists, so coin.pos.x might not exist and if it doesn’t, the system will correctly tell you that it cannot read the property ‘pos’ of null.



Hmmm, “if coin” is there. Should the variable coinPos be after the if coin so that it looks first then defines the position?


Right – if you try to grab the coin’s position when there isn’t one, you’ll get that error. Just shifting the coinPos line into the if conditional should do the trick.

Think of it this way, you only need the coin’s position IF there is a coin, so check first, then do things with the coin.


Thank you! (20 characters)