Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Obyron
Novice


Joined: 29 Jan 2006
Posts: 40
Location: Aardwolf

PostPosted: Thu Jul 29, 2010 2:17 pm   

Help File Error [3.22]
 
Stand back, this one's huge! ;)

In #HELP %push there's an example that reads:

Quote:
List=%push("a",@List)


The proper syntax is %push("a",List). For whatever reason %push and %pop don't need the @.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Jul 29, 2010 3:01 pm   
 
Good catch... Very Happy

Actually I'm fairly certain that's a result of new features added in the 3.x beta line. And since the public and beta files share the same help source, the documentation isn't updated until just before release.
_________________
Asati di tempari!
Reply with quote
Obyron
Novice


Joined: 29 Jan 2006
Posts: 40
Location: Aardwolf

PostPosted: Tue Aug 03, 2010 5:30 pm   
 
Another one:

#HELP %additem has the example:

Quote:
#SHOW %addItem("kill orc",@ToDo)


%additem does not need an @ before the variable name, and, in fact, will not work if you include it.[/quote]
Reply with quote
Derar
Novice


Joined: 09 Sep 2006
Posts: 44

PostPosted: Tue Aug 03, 2010 5:50 pm   
 
This one's not quite true.

Both syntax work with the new by-reference capability. The difference is in what happens to the actual variable.

#SHOW %additem("kill orc", @ToDo) will show you @ToDo with "kill orc" added, but it won't actually modify the variable; the output of #SHOW is just a modified copy.

#SHOW %additem("kill orc", ToDo) will actually add "kill orc" to the list var, and then show you the updated list.

Basically it's a faster way of doing:

ToDo = %additem("kill orc", @ToDo)
#SHOW @ToDo


If I'm not mistaken, the helpfiles that ship don't get updated until actual release is pending? I think I read that in another thread somewhere.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net