PDA

View Full Version : Scores and subtracting from total score


hc_wolf
04-05-2012, 04:54 AM
Question I have a Int ScoreBlue;

As smething is destroyed the score increase. ScoreBlue = ScoreBlue + 10;

Is there a way to subtact from the Total in the int ScoreBlue; ?

Which of these would be best or something else?

ScoreBlue = ScoreBlue - 10;

or

ScoreBlue -= 10;

or

ScoreBlue =( 10-ScoreBlue )

something else?

FG28_Kodiak
04-05-2012, 05:01 AM
There is no problem to subtract a int.

you can use:

ScoreBlue = ScoreBlue - 10;
or
ScoreBlue -= 10;

hc_wolf
04-05-2012, 05:22 AM
Excellent :)

I am already using ScoreBlue = ScoreBlue - 10;

But I had a panic attack thinking it may not actually subtract. All is well in coding land :)

FYI the fruits of your's and my laybour is now uploaded on the ATAG server 2 and 1 i think RedvBlue_1.0 mission. Your assistance has been the key.

Thanks!