# Whats wrong with this AS

**URL:** <https://forum.kirupa.com/t/whats-wrong-with-this-as/40676>\
**Category:** programming\
**Created:** [January 20, 2004, 11:29pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this-as/40676 "2004-01-20T23:29:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WarrOrange](https://avatars.discourse-cdn.com/v4/letter/w/dbc845/32.png) [@WarrOrange](https://forum.kirupa.com/u/WarrOrange)\
**Post date:** [January 20, 2004, 11:29pm UTC](https://forum.kirupa.com/t/whats-wrong-with-this-as/40676/1 "2004-01-20T23:29:52Z")

</div>

Ok i was making code so when the enemies hp is 0 or less than it would goto and play the win frame and if your hp is = or less than 0 it would play the frame “lose”. I have no idea why this isnt working but hopefully one of you kirupians can help me out

[AS]  
if (\_root.enemyhp \< 0)  
{  
gotoAndPlay(“win”);  
}  
if (\_root.hp \< 0)  
{  
gotoAndPlay(“lose”);  
}  
[/AS]
