# Scoring

**URL:** <https://forum.kirupa.com/t/scoring/116140>\
**Category:** Uncategorized\
**Created:** [July 14, 2004, 11:40pm UTC](https://forum.kirupa.com/t/scoring/116140 "2004-07-14T23:40:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![worm](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/worm/32/235_2.png) [@worm](https://forum.kirupa.com/u/worm)\
**Post date:** [July 14, 2004, 11:40pm UTC](https://forum.kirupa.com/t/scoring/116140/1 "2004-07-14T23:40:32Z")

</div>

I used the code i found here  
[http://www.kirupa.com/developer/mx/score.htm](http://www.kirupa.com/developer/mx/score.htm)  
to create some simple scoring.  
It works fine but when i drop it on a fla im working on, the text box thats supposed to show the score displays the text ‘NaN’ instead of the score.  
What could possibly be wrong.

heres the original code

```auto
on (release) { _root.total = _root.total + 100; }

```

and heres what i edited it to be (im doing some drag and drop stuff

```auto
on (release) {
		stopDrag();
		if (this._droptarget=="/male") {
		setProperty(this, _x, 306.0);
		setProperty(this, _y, 65.0);
		_root.sob.gotoAndPlay ("happy");
                 _root.total = _root.total + 100
	}

```

This code is on a button by the way
