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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Interitus
Novice


Joined: 16 Mar 2003
Posts: 45
Location: Russia

PostPosted: Tue Mar 25, 2003 5:46 pm   

%random returns the same number every time
 
#SHOW %random(1,10) command shows different numbers every time I enter it, but if I define alias #ALIAS RAND1 {#SHOW %random(1,10)} zMUD always returns 7 insteat of random number.
How to solve this problem?
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Tue Mar 25, 2003 8:38 pm   
 
I wasn't able to replicate this problem using the latest beta (6.55a). Looking through the zMUD version history doesn't show any recent changes (ie, not since 5.47) with %random so... what version of zMUD are you using?


 - Charbal
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Mar 25, 2003 8:40 pm   
 
Check the alias after it is created. Does it still contain the %random function, or was it by any chance expanded at the moment of creating the alias and it is just a number now?

Kjata
Reply with quote
Interitus
Novice


Joined: 16 Mar 2003
Posts: 45
Location: Russia

PostPosted: Wed Mar 26, 2003 8:23 am   
 
quote:

Check the alias after it is created. Does it still contain the %random function, or was it by any chance expanded at the moment of creating the alias and it is just a number now?


It expanded to number. How do I prevent function from expanding?
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Wed Mar 26, 2003 8:27 am   
 
It sounds like you have the Expand Vars option on in your preferences. This option is provided for the people that want it but in practice can cause more issues (like this) than it solves. So it is off by default.

To turn it back off, do View, Preferences, General, Script Parser and uncheck Expand Vars.

That should fix the problem.

 - Charbal
Reply with quote
Interitus
Novice


Joined: 16 Mar 2003
Posts: 45
Location: Russia

PostPosted: Wed Mar 26, 2003 8:32 am   
 
Kjata and Charbal, thanks alot, I have solved my problem.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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