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
rhodges
Novice


Joined: 02 Jan 2002
Posts: 33
Location: USA

PostPosted: Fri Apr 23, 2004 8:37 am   

Suggestion: Option Explicit
 
Zmud creating variables in every default folder is a little tiresome, especially when I go through the effort of creating the variable before hand.

I think a great option is a ripoff of VB's option explicit. This preference would require all variables be declared. To declare the variable, you create it with the #VAR or using the editor.

Doing @varName = "something" would not create a new variable. It would error out if varName hadn't been created.
Reply with quote
Ratalon
Beginner


Joined: 08 Apr 2004
Posts: 24
Location: USA

PostPosted: Fri Apr 23, 2004 8:39 am   
 
I always just let the program create the @vars then moved them to whatever folder by hand.
It doesn't recgonize @vars that you have already created? Are they in the same folder as your trigger or whatever is making them?
Reply with quote
rhodges
Novice


Joined: 02 Jan 2002
Posts: 33
Location: USA

PostPosted: Fri Apr 23, 2004 8:47 am   
 
Sometimes it recognizes them, sometimes it doesn't. Sometimes it creates a copy of it in any folder that is set to default, or the "root" folder most of the time.
Reply with quote
Pega
Magician


Joined: 08 Jan 2001
Posts: 341
Location: Singapore

PostPosted: Fri Apr 23, 2004 11:12 am   
 
Did you want to do @varName = "something" or varname = "something"?
My advice is to avoid using the a = b assignment of variables.

Disable a = b syntax in your General Parsing preferences, and stick to the #VA command:
#VA [variable] [value] [defaultval] [classname] as stated in the help file.
If you specify the classname using #VA, then variable will always be created in the specified class folder even if the folder was disabled or did not already exist.
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