About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Changes for zMUD users
  Importing zMUD files
  New Features
  New Commands
  New Functions
  Compiled scripts
  [] and <> syntax removed
  %%1 syntax removed
  AND OR operators changed
  Class specifier changes
  #PRIORITY command
  Quotes around %1..%99
  #VAR command
  #MENU command
  64-bit integers
  #GALIAS and #GVAR
  %lastcom
  Expression optimization
  Aliases (Auto-append)
  atconnect alias replaced with Events
  #GAG in #ONINPUT trigger
  #T+ vs #CLASS
  Tab completion changes
  Multi-threaded #WAIT
  %btncol arguments reversed
  Multiplaying :window: syntax
  Start lines with commands
  #FUNCTION command
  Variable assignment syntax
Related Links:
  Editing Events
  New Features
  Editing Aliases
  Editing Functions
%%1 syntax removed [[cmud_changes_%%1]] 
In zMUD you could use multiple % or @ characters to "delay" the expansion of variables or arguments. This is no longer supported in CMUD. Instead, using local variables or "named arguments" can be used and result in scripts that are easier to understand.

For example:
Code:
zMUD:
#ALIAS make {#ALIAS %1 {cast %1 %%1}}

CMUD:
#ALIAS make($spell) {#ALIAS $spell($target) {cast $spell $target}}

The zMUD example is hard to figure out. The CMUD version is easier to understand. As an example of using this alias, typing:

make heal

creates the following alias:
Code:
zMUD:
#ALIAS heal {cast heal %1}

CMUD:
#ALIAS heal($target) {cast heal $target}

In both of these cases you now have a "heal" alias that can be used to cast a spell on a specific target.

Notice that in CMUD, you can give a *name* to the arguments of an alias, instead of just using %1..%99. Since arguments are named, there is no longer any need for the wierd %%1 syntax.
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net