hi,

im trying to add a number to another number which keeps increasing on every rule

that is what i have:

(defrule fight
(object knife)
  =>
(assert (Fight))
(assert (update-scores 10))
(printout t "Fight !" crlf)
)

(defrule update-scores
  (update-scores ?c)
  =>
 (call ?s setAgr (+ (call ?s getAgr) ?c)))

and i want it to be something like:
score starts with 0

and when rule fight is fire then it should add 10   so the final score is 10

and if another rule is fired it will add also 10 and then the final score is 20 etc...

how can i do that?  what i have  now is just replacing and not adding

best regards,

m.ismail

_________________________________________________________________
Veilig & gerust mailen met de verbeterde antivirusscan van Live Mail! http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to