# Problems with numbers in current frame statement

**URL:** https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542
**Category:** Uncategorized
**Created:** [February 27, 2003, 3:39pm UTC](https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542 "2003-02-27T15:39:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![korrupt](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@korrupt](https://forum.kirupa.com/u/korrupt)
#### Post date: [February 27, 2003, 3:39pm UTC](https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542/1 "2003-02-27T15:39:19Z")

</div>

Hey friends, I’m making a stick fighting game and have fun into a few problems, maybe lostinbeta or some other super genius could help me out, :bad:.

I’m creating the sticks actions right now and have been experimenting with a script so when you punch you don’t move. Look:

```php

onClipEvent (enterFrame) {
	if (Key.isDown(key.LEFT)) {
		_x -= 5;
	}
}
onClipEvent (enterFrame) {
if (this._currentframe==9 - 16) {
         if (Key.isDown(key.RIGHT)) {
		_x += 0;
		 }
} else {
	if (Key.isDown(key.right)) {
		_x += 5;
	}
}
}

```

See where it says “onClipEvent (enterFrame) {  
if (this.\_currentframe==9 - 16) {  
if (Key.isDown(key.RIGHT)) {  
\_x += 0;  
}”? I want it to be when it’s between 9 and 16 that you can’t move, ie: \_x + 0. But 9 - 16 doesn’t work, I think it takes it as 9 subtracted by 16. Any suggestions?

Thanks in advance,  
KoRRupt

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 27, 2003, 3:46pm UTC](https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542/2 "2003-02-27T15:46:51Z")

</div>

```auto
if (this._currentframe == 9 || this._currentframe == 16) {

```

?? … 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 27, 2003, 3:55pm UTC](https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542/3 "2003-02-27T15:55:08Z")

</div>

or

```auto
if (this._currentframe > 9 && this._currentframe < 16) {

```

?? … 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 27, 2003, 3:58pm UTC](https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542/4 "2003-02-27T15:58:33Z")

</div>

> **between 9 and 16**

oops … stupid me :trout:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 27, 2003, 4:04pm UTC](https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542/5 "2003-02-27T16:04:44Z")

</div>

![](http://userpages.umbc.edu/~tmccau1/images/smilies/nurse.gif)

😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 27, 2003, 11:15pm UTC](https://forum.kirupa.com/t/problems-with-numbers-in-current-frame-statement/14542/6 "2003-02-27T23:15:32Z")

</div>

LOL, Thanks fellow friends…

It worked… :bad:

Thanks again,  
KoRRupt
