# Problem with adding points to total score

**URL:** <https://forum.kirupa.com/t/problem-with-adding-points-to-total-score/189099>\
**Category:** flash\
**Created:** [May 13, 2006, 5:24pm UTC](https://forum.kirupa.com/t/problem-with-adding-points-to-total-score/189099 "2006-05-13T17:24:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurth](https://avatars.discourse-cdn.com/v4/letter/k/e0b2c6/32.png) [@kurth](https://forum.kirupa.com/u/kurth)\
**Post date:** [May 13, 2006, 5:24pm UTC](https://forum.kirupa.com/t/problem-with-adding-points-to-total-score/189099/1 "2006-05-13T17:24:53Z")

</div>

I have created a simple slot machine type game and each time you press the spin button you lose 1 coin. Got that no problem. I can’t seem to figure out how to add points to total score when one of the dynamic text brings up a certain number.  
I have three dynamic text fields that bring up random numbers when the spin button is pressed.  
this is the script i have tried.  
on (release) {  
\_root.total=\_root.total-1;  
if(\_root.quote\_txt==7){  
\_root.total=\_root.total+10;  
}  
quote\_txt is the instance name for my first text field, and total is my var for the score box.  
I hope i’ve made sense of what i’m trying to do.  
Please help, thanx.  
kurth
