# Varible adding problems \>\_\<

**URL:** <https://forum.kirupa.com/t/varible-adding-problems--/200608>\
**Category:** programming\
**Created:** [September 13, 2006, 4:44pm UTC](https://forum.kirupa.com/t/varible-adding-problems--/200608 "2006-09-13T16:44:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drexegar](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@Drexegar](https://forum.kirupa.com/u/Drexegar)\
**Post date:** [September 13, 2006, 4:44pm UTC](https://forum.kirupa.com/t/varible-adding-problems--/200608/1 "2006-09-13T16:44:33Z")

</div>

Hey guys how ya doing.

Im finishing up a game right now and Im having a simple problem which is getting me frustrated. Its with varibles.

When I put in this code:

\_parent.scores = \_parent.scores - 500;

I get -500; -1000; -1500;

But when I change the subtract to a plus sign I get:

\_parent.scores = \_parent.scores - 500;

I get 500; 500500; 500500500;

This code will add correctly on a button, But why when I do this on a onclip handler it does that but it subtracts correctly! \>\_\<

I apoligize If this was solve already in a nother thread but I serached and cant find a solution. It would help me a lot.

Thanks for your time.
