AnsweredAssumed Answered

how to use variables?

Question asked by JohannaFreeman on Nov 29, 2010
Latest reply on Dec 3, 2010 by JohannaFreeman


how to use variables?



i'm trying to use a variable to handle the hit points of a player of a basic text game:

every time a specific calculation gives a result the variable gets +1 and display what happened

on the combat field:

Case ( defense="hit"; "hit!"....)

I need to remeber the actual hit points status of the player, before adding any, so I need a variable to store the data. Simply, every time I got "hit" $health get +1.

on the hit points field:

Case ( defense="hit"; Let ($health = $health+1); ....)

I know syntax is wrong but cant find out how to let this work

thanks ^^