Zillions macro bug concerning variabl... Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Zillions macro bug concerning variables found. « Previous Next »

Author Message
Karl Scherer (Karl)
Posted on Wednesday, February 09, 2005 - 12:16 am:   

To all authors:

Jeff Mallet has confirmed a Zillions bug in V2.0
which I ran across lately:
There are cases such that the call
(Mymacro 1 2)
works, but
(Mymacro 2 1)
does not work.
This happens when inside the macro Mymacro
the number-only parameters are used in conjunction, e.g.
(change-type man$1$2) ... (create man$2$1)

I had this problem when designing the game
"Harry".
As a workaroud I passed an additional parameter
to the macro such as
(Mymacro 1 2 21)
with the usages:
(change-type man$1$2) ... (create man$3).

Cheers, Karl
Karl Scherer (Karl)
Posted on Wednesday, February 09, 2005 - 12:27 pm:   

I just realized that there is a more elegant workaround for this problem:
Use hyphen in between digits when naming tokens, such as:
man-1-2 and man-2-1.
This way the system does not get confused,
and no additional passed parameters are necessary, which is a more elegant solution
than the one I mentioned in my previous message.

As long as this method is properly desribed in the help text, it may not be necessary for Jeff Mallet to provide a fix for this.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: