# Help with variables, please

**URL:** https://forum.kirupa.com/t/help-with-variables-please/160360
**Category:** flash
**Created:** [August 25, 2005, 12:33pm UTC](https://forum.kirupa.com/t/help-with-variables-please/160360 "2005-08-25T12:33:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fathed](https://avatars.discourse-cdn.com/v4/letter/f/b5ac83/32.png) [@fathed](https://forum.kirupa.com/u/fathed)
#### Post date: [August 25, 2005, 12:33pm UTC](https://forum.kirupa.com/t/help-with-variables-please/160360/1 "2005-08-25T12:33:05Z")

</div>

I have made a promotional game for my band and I need a little help with the scoring.

I have a variable set up for the number of objects hit and the number of shots fired. I want to average the two together to get accuracy.

I have it set up as (just for example):

> 

[color=Orange]//an example of how i am tracking the scoring[/color]  
[color=Red] \_root.shots += 1;[/color]  
[color=Orange] //and then I declare[/color]  
[color=Red] shots += 0;[/color]

I am basically just wanting to subtract

> [color=Red]\_root.score[/color]\* from\* [color=Red]\_root.shots[/color]

I am still pretty new at this. I tried a few different ways and now I am tapped out. If anyone has any ideas on how to make this work I would be greatfull.
