Click to See Complete Forum and Search --> : Game


petermar30030
06-26-2003, 11:43 AM
I'm Making A Game Entirely With Javascript But I'm Having Problems With Some Of The Forms I Included In The Game,

One Of The Forms I'm Having Trouble With Is A Function I Call 'Function Take_money()' Which Lets You Deposit Money Into A JavaScript 'Bank' Which Holds A Variable With The Amount Deposited.

The Problem Is I Don't Know How To Take Money Away From The Variable So That You Don't Always Have The Same Amount Of Money To Take away From.

I'd Appreciate Any Direct Help.:cool:,
I Hope It's Not too Confusing :)

pyro
06-26-2003, 11:49 AM
Not sure if I understand what you mean, but this will take 100 away from the variable named amount:

amount = amount - 100;

petermar30030
06-26-2003, 11:59 AM
Thanx!
I already Knew How To Do That But I apreciate The Response:cool:

pyro
06-26-2003, 12:01 PM
Well, explain you question better, if that was not what you were looking for...