Re: herb counter
will guaraldi <[email protected]> Fri, 7 Jan 2005 08:50:59 -0600 (CST)
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
What's going on is that both %2 get evaluated to "korzen", so then the
#math statement becomes:
#math korzen korzen+1
What you want it to become is:
#math korzen %korzen+1
because then #math treats %korzen as a variable, fills it in, and then
does the math. It has no idea what the string "korzen" is all by itself.
Incidentally, Lyntin has a debugmode which helps immensely in evaluation
issues and macro debugging. You can turn it on and off at will like this:
#config debugmode on
#config debugmode off
Hope that helps--
/will
On Fri, 7 Jan 2005, Bartosz wrote:
>
> I'm trying to write herb counter so I can know how much different herbs
> I have found but when I add an action
>
> #action {Znajdujesz %0 %1 %2.} {#variable %2 1;#math %2 %2+1}
> # action: {Znajdujesz %0 %1 %2.} {#variable %2 1;#math %2 %2+1} color={0} priority={5} tag={} added.
>
> this action worked like this:
>
> # variable: {korzen}={1} added.
> math: exception: korzen+1
> name 'korzen' is not defined
> Znajdujesz bialy okazaly korzen. <- this trigered action
>
> at first it created variable "korzen" but when it tryed to add 1 to this
> variable an exeption appeared that variable "korzen" is not defined and
> I don't understand why, thought variable was added
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt