# Power Up Man v1.0

**URL:** https://forum.makecode.com/t/power-up-man-v1-0/3883
**Category:** Arcade
**Tags:** game
**Created:** [October 14, 2020, 7:25pm UTC](https://forum.makecode.com/t/power-up-man-v1-0/3883 "2020-10-14T19:25:33Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)
#### Post date: [October 15, 2020, 6:52pm UTC](https://forum.makecode.com/t/power-up-man-v1-0/3883/4 "2020-10-15T18:52:09Z")

</div>

> [@FlintAsher](#):
>
> Also for some reason sometimes when i shoot an enemy the game will come up with an error that says ‘failure to call on null’ I’m glad it works for everyone else cause i have no idea how to fix it.

I think this has to do with this block.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/02509cafa979807ff5ee63aeb8833443b19df557.png)

If I understand this extension correctly, this event fires when the enemy’s health reaches zero, so you can decide what to do with the enemy. However, you are simply deleting a reference to an enemy sprite that was created in the game update loop.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2f0498e51d205833ca7ee7b812629401100fc4d5.png)

So I am guessing when another piece of code is accessing an enemy sprite somewhere, that maybe that reference no longer exists.

I think what you need to do is this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/31944dfb63a1171da35c44112602fd876caded51.png)

You set a reference to the sprite whose status bar has reached zero, and then delete it. Give that a try and let me know how that goes. If you are unsure, you could ask @jwunderl as he made and/or announced the extension: [Status Bars extension (beta)](https://forum.makecode.com/t/status-bars-extension-beta/1847)

---

_[View the full topic](https://forum.makecode.com/t/power-up-man-v1-0/3883)._
