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
LordBudigert737
Beginner


Joined: 15 Jan 2015
Posts: 16

PostPosted: Thu Jan 15, 2015 2:01 pm   

#ADDITEM not adding items to variable list
 
This is my script:

Code:

#CLASS {FriendAndFoe}
#ALIAS addsedai {#ADDITEM %proper("%w") AesSedai}
#ALIAS delsedai {#DELITEM %proper("%w") AesSedai}
#ALIAS addlancer {#ADDITEM %proper("%w") Lancer}
#ALIAS dellancer {#DELITEM %proper("%w") Lancer}
#ALIAS addaccepted {#ADDITEM %proper("%w") Accepted}
#ALIAS delaccepted {#DELITEM %proper("%w") Accepted}
#ALIAS addnovice {#ADDITEM %proper("%w") Novice}
#ALIAS delnovice {#DELITEM %proper("%w") Novice}
#ALIAS addgaidin {#ADDITEM %proper("%w") Gaidin}
#ALIAS delgaidin {#DELITEM %proper("%w") Gaidin}
#ALIAS addvalon {#ADDITEM %proper("%w") Valon}
#ALIAS delvalon {#DELITEM %proper("%w") Valon}
#ALIAS addmc {#ADDITEM %proper("%w") KnownMC}
#ALIAS delmc {#DELITEM %proper("%w") KnownMC}
#ALIAS addcriminal {#ADDITEM %proper("%w") Criminals}
#ALIAS delcriminal {#DELITEM %proper("%w") Criminals}
#ALIAS addchild {#ADDITEM %proper("%w") Children}
#ALIAS delchild {#DELITEM %proper("%w") Children}
#ALIAS warrant {#ADDITEM %proper("%w") Criminals}
#ALIAS pardon {#DELITEM %proper("%w") Criminals}
#ALIAS showsedai {#SHOW @AesSedai}
#ALIAS showlancer {#SHOW @Lancer}
#ALIAS showaccepted {#SHOW @Accepted}
#ALIAS shownovice {#SHOW @Novice}
#ALIAS showgaidin {#SHOW @Gaidin}
#ALIAS showvalon {#SHOW @Valon}
#ALIAS showmc {#SHOW @KnownMC}
#ALIAS showcriminal {#SHOW @Criminal}
#ALIAS showchildren {#SHOW @Children}
#TRIGGER {{@AesSedai}} {#CW crimson} "" {case}
#TRIGGER {{@Accepted}} {#CW skyblue} "" {case}
#TRIGGER {{@Novice}} {#CW springgreen} "" {case}
#TRIGGER {{@Valon}} {#CW darksalmon} "" {case}
#TRIGGER {{@KnownMC}} {#CW orangered} "" {case}
#TRIGGER {{@Gaidin}} {#CW royalblue} "" {case}
#TRIGGER {{@Children}} {#CW deeppink} "" {case}
#TRIGGER {{@Lancer}} {#CW 14} "" {case}
#TRIGGER {{@Criminals}} {#CW 12} "" {case}
#CLASS 0


It is supposed to be a simple 'buddy list' that I can simply type addsedai hillary (for example) and then, when I see Hillary out and about on the MUD, his/her name will be colored appropriately according to which group/clan I've added her to. However, no names I type are being added to the variables.

I type addsedai joe
then I type 'where' and joe is not colored.
I type #SHOW @AesSedai and nothing is returned.

Any help is greatly appreciated. Thank you.
Reply with quote
shalimar
GURU


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

PostPosted: Thu Jan 15, 2015 2:18 pm   
 
Is this class in a package that is included in your session settings?
Is that package enabled in the advanced tab of any window you want the names colored in?
Is this class enabled?
Do you have multiple copies of the variables?

also, %w is undefined in your alias, it is a wildcard for pattern matching, you want %params
and lose the quote marks, that tells it to use it as a literal string instead of interpret the function
_________________
Discord: Shalimarwildcat
Reply with quote
LordBudigert737
Beginner


Joined: 15 Jan 2015
Posts: 16

PostPosted: Thu Jan 15, 2015 2:25 pm   
 
I have added the {enabled}
At the moment, it is not anything.. lol. I just keep tweaking at the coding, and then copy/paste it into my MUD and I test it. If it doesn't work, I delete the folder from my package editor.

I was originally using ("%1") instead of %w, but that didn't work either. Do I need to replace the %w's to %params?

Thanks for the reply!

Edit: And no, there are no other instances of these variables. Starting out on a pretty fresh install/session for this character.
Reply with quote
shalimar
GURU


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

PostPosted: Thu Jan 15, 2015 2:35 pm   
 
it using "%1" instead of %1 that is the issue
"%1" is literally just %1
%1 gets evaluated into the first parameter passed to the setting
_________________
Discord: Shalimarwildcat
Reply with quote
LordBudigert737
Beginner


Joined: 15 Jan 2015
Posts: 16

PostPosted: Thu Jan 15, 2015 2:48 pm   
 
Hrm. Not it. A snippet from my MUD for example.

Code:

* HP:Healthy MV:Fresh > who
  Players
  -------
   Grognak of Kandor (Idle)
   Cadell of Saldaea
   Ketch of the Borderlands
   Rin of the Borderlands
   Khahliana sur Mardukis  [Brown Ajah Sitter]
   Dolken of Two Rivers
   Sena the Wearied Novice  [White Tower]
   Fulke of Two Rivers
   Nate Cross
   Thrael of Kandor
   Roberts of Tarabon
   Aayan Soradin |Lancer Applicant|
   Namida of Saldaea
   Kerryk Medakan, Samarin Refugee
   Rixie Dalhorne, Wearied Novice  [White Tower]

  15 players displayed.

HERE I TYPE addlancer aayan

* HP:Healthy MV:Fresh > who
  Players
  -------
   Grognak of Kandor (Idle)
   Cadell of Saldaea
   Ketch of the Borderlands
   Rin of the Borderlands
   Khahliana sur Mardukis  [Brown Ajah Sitter]
   Dolken of Two Rivers
   Sena the Wearied Novice  [White Tower]
   Fulke of Two Rivers
   Nate Cross
   Thrael of Kandor
   Roberts of Tarabon
   Aayan Soradin |Lancer Applicant|
   Namida of Saldaea
   Kerryk Medakan, Samarin Refugee
   Rixie Dalhorne, Wearied Novice  [White Tower]

  15 players displayed.

* HP:Healthy MV:Fresh > say aayan not colored.
You say 'aayan not colored.'

* HP:Healthy MV:Fresh >  HERE I TYPE showlancer NOTHING IS RETURNED, SO I TYPE #show @Lancer (nothing is returned, telling me aayan never made it into the lancer variable.)


Script now looks like this:
Code:

#CLASS {FriendAndFoe} {enabled}
#ALIAS addsedai {#ADDITEM %proper(%1) AesSedai}
#ALIAS delsedai {#DELITEM %proper(%1) AesSedai}
#ALIAS addlancer {#ADDITEM %proper(%1) Lancer}
#ALIAS dellancer {#DELITEM %proper(%1) Lancer}
#ALIAS addaccepted {#ADDITEM %proper(%1) Accepted}
#ALIAS delaccepted {#DELITEM %proper(%1) Accepted}
#ALIAS addnovice {#ADDITEM %proper(%1) Novice}
#ALIAS delnovice {#DELITEM %proper(%1) Novice}
#ALIAS addgaidin {#ADDITEM %proper(%1) Gaidin}
#ALIAS delgaidin {#DELITEM %proper(%1) Gaidin}
#ALIAS addvalon {#ADDITEM %proper(%1) Valon}
#ALIAS delvalon {#DELITEM %proper(%1) Valon}
#ALIAS addmc {#ADDITEM %proper(%1) KnownMC}
#ALIAS delmc {#DELITEM %proper(%1) KnownMC}
#ALIAS addcriminal {#ADDITEM %proper(%1) Criminals}
#ALIAS delcriminal {#DELITEM %proper(%1) Criminals}
#ALIAS addchild {#ADDITEM %proper(%1) Children}
#ALIAS delchild {#DELITEM %proper(%1) Children}
#ALIAS warrant {#ADDITEM %proper(%1) Criminals}
#ALIAS pardon {#DELITEM %proper(%1) Criminals}
#ALIAS showsedai {#SHOW @AesSedai}
#ALIAS showlancer {#SHOW @Lancer}
#ALIAS showaccepted {#SHOW @Accepted}
#ALIAS shownovice {#SHOW @Novice}
#ALIAS showgaidin {#SHOW @Gaidin}
#ALIAS showvalon {#SHOW @Valon}
#ALIAS showmc {#SHOW @KnownMC}
#ALIAS showcriminal {#SHOW @Criminal}
#ALIAS showchildren {#SHOW @Children}
#TRIGGER {{@AesSedai}} {#CW crimson} "" {case}
#TRIGGER {{@Accepted}} {#CW skyblue} "" {case}
#TRIGGER {{@Novice}} {#CW springgreen} "" {case}
#TRIGGER {{@Valon}} {#CW darksalmon} "" {case}
#TRIGGER {{@KnownMC}} {#CW orangered} "" {case}
#TRIGGER {{@Gaidin}} {#CW royalblue} "" {case}
#TRIGGER {{@Children}} {#CW deeppink} "" {case}
#TRIGGER {{@Lancer}} {#CW 14} "" {case}
#TRIGGER {{@Criminals}} {#CW 12} "" {case}
#CLASS 0
Reply with quote
shalimar
GURU


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

PostPosted: Thu Jan 15, 2015 2:55 pm   
 
Aha!
your add and del items are backwards

#ADDITEM Variable Value

You might have a bunch of homeless variables named after your friends
_________________
Discord: Shalimarwildcat
Reply with quote
LordBudigert737
Beginner


Joined: 15 Jan 2015
Posts: 16

PostPosted: Thu Jan 15, 2015 3:04 pm   
 
Boom! Cool

Thank you so much! It works! I knew it had to be something fairly simple, and it was two somethings. You, sir, get a cookie! :)
Reply with quote
shalimar
GURU


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

PostPosted: Thu Jan 15, 2015 3:05 pm   
 
Mmmmm... cookies.
_________________
Discord: Shalimarwildcat
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