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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Sep 28, 2012 6:19 am   

Okay Here's my first question
 
It may be I am rusty or that it's late, this seems easy but I am haveing a bit of trouble with it.

#TRIGGER {.(%d)} {#var 1 2; #sh @1}

It's a simple test to see if:
1) I can create a variable named "1"
2) If it can be assigned information

What I see on screen is " @1 "
No variable is created
I am hoping I wrote it wrong.

I know I can create the var manually, but again I can't seem to change it's info.
Now if I change it to this: #TRIGGER {.(%d)} {#var a 2; #sh @a}
It works just fine and I can change the 2 to anything.

Anything would help, Thanks
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4702
Location: Pensacola, FL, USA

PostPosted: Fri Sep 28, 2012 6:32 am   
 
you cannot have a variable name that starts with a number
_________________
Discord: Shalimarwildcat
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Sep 28, 2012 8:24 pm   
 
Yup the above statement is true, it does not work in Cmud.
However it does work just fine in Zmud.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4702
Location: Pensacola, FL, USA

PostPosted: Fri Sep 28, 2012 9:15 pm   
 
One of the growing pains, but hardly a game stopper, especially since db variables can now go to any depth.
_________________
Discord: Shalimarwildcat
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Sun Sep 30, 2012 2:21 am   
 
Think like this... % is child and @ is parent. When starting a line everything starts with a #, so if it goes anywhere past the #(Parent Command) it is a %(Child) function.

Example: #VAR variable %clip

Takes the VAR command and makes its value the clipboard by using the %clip function.

Variable usage is just the same. The variables written in the CODE(Parent) are primary to the secondary variables being adopted (child). So by example:

#VAR captureVAR %1

And to show it would be ...

#SHOW @captureVAR
or
#SHOW %1

%1-%99 are Predefined Variables.

For further study look here: http://forums.zuggsoft.com/modules/mx_kb/kb.php?page=3&mode=doc&k=2682
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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