# gotoAndStop("game over"); He only dies...why?

**URL:** <https://forum.kirupa.com/t/gotoandstop-game-over-he-only-dies-why/76060>\
**Category:** flash\
**Created:** [January 14, 2005, 1:19pm UTC](https://forum.kirupa.com/t/gotoandstop-game-over-he-only-dies-why/76060 "2005-01-14T13:19:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yossarian](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@yossarian](https://forum.kirupa.com/u/yossarian)\
**Post date:** [January 14, 2005, 1:19pm UTC](https://forum.kirupa.com/t/gotoandstop-game-over-he-only-dies-why/76060/1 "2005-01-14T13:19:19Z")

</div>

I’m creating a small game for some of my pupils and I’m almost done. However, there’s a tiny problem with the function I’m using as instead of losing a life, the player goes from **lose life** to **game over**. Any ideas why?

```
 I've added the correct frame labels and 

```

```auto
stop();

```

actions on each frame.

Her’e’s part of the function:

```auto
if (Math.abs(bunny._x - fox._x) <= 10 and Math.abs(bunny._y - fox._y) <= 10) {
     		if (lives < 1) {
     			gotoAndStop("game over");
     		} else {
     			lives--;
     			gotoAndStop("lost life");
     		}
     	}
      }
      

```

```
 If anyone knows what to do or anywhere to look please let me know, I really want to finish this!
 
 Cheers,
 
 Y
```
