# Variable decides gotoAndStop(15);

**URL:** <https://forum.kirupa.com/t/variable-decides-gotoandstop-15/276390>\
**Category:** flash\
**Created:** [November 26, 2008, 2:59pm UTC](https://forum.kirupa.com/t/variable-decides-gotoandstop-15/276390 "2008-11-26T14:59:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elanz](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@Elanz](https://forum.kirupa.com/u/Elanz)\
**Post date:** [November 26, 2008, 2:59pm UTC](https://forum.kirupa.com/t/variable-decides-gotoandstop-15/276390/1 "2008-11-26T14:59:47Z")

</div>

Hey, im building a game right now.  
But im having some trouble.  
I have a variable, saying that Points are 0  
and points can be collected throughout the game.  
and i want the level change to happen when the points are greater that some number. IE: 30 points.

i thought i could write something like

[COLOR=blue]if[/COLOR] ([COLOR=blue]\_root[/COLOR].poeng == 30) {  
[COLOR=blue]gotoAndStop/COLOR;  
}

or

[COLOR=blue]if[/COLOR] ([COLOR=blue]\_root[/COLOR].poeng \<= 30) {  
[COLOR=blue]gotoAndStop/COLOR;  
}

dont remember what way i set the bracket, but greater. you get the point

dont worry about me spelling Points wrong. It’s norwegian, and the exact same as the variable name.

How do i write this ?  
If my explaination of this problem is weak, just tell me, and i will try to explain better!  
On advance, thank you for any help 🙂
