# Keeping score

**URL:** <https://forum.kirupa.com/t/keeping-score/128446>\
**Category:** Uncategorized\
**Created:** [November 12, 2004, 1:11pm UTC](https://forum.kirupa.com/t/keeping-score/128446 "2004-11-12T13:11:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clwright\_2000](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@clwright\_2000](https://forum.kirupa.com/u/clwright_2000)\
**Post date:** [November 12, 2004, 1:11pm UTC](https://forum.kirupa.com/t/keeping-score/128446/1 "2004-11-12T13:11:41Z")

</div>

:to: I know its not the most efficient but why doesnt it at least keep count? Im pretty much givin up here.

Im setting store1 to 10 to 0 or 1 fine. But need a final score count when the button containing the following code is pressed.

Anyone feeling helpfull?

I would be really greatful 🙂

Clest

on (press) {

```
if (_root.store5 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
		

if (_root.store4 == 1) {
		
		_root.totalScore = _root.totalScore +1;
		
		
if (_root.store1 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
	
		
if (_root.store2 == 1) {
		
		_root.totalScore = _root.totalScore +1;
		
		
if (_root.store3 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
		
if (_root.store6 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
		
		
if (_root.store7 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
		
		
if (_root.store8 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
		
		
if (_root.store9 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
		
		
if (_root.store10 == 1) {
		
		_root.totalScore = _root.totalScore +1;			
		
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

```

}
