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
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Wed Sep 19, 2012 11:15 pm   

something not quite working
 
ok got an alias

value is

#if (%ismember( @clist1, @symptom)) {7} {#if (%ismember( @clist2, @symptom)) {6} {#if (%ismember( @clist3, @symptom)) {#SEND %db( @HealDB, %i)} {noop}}}

got three string lists each with conditions in - obviously im trying to match conditions in eack list to a syptom variable

Help please
Reply with quote
shalimar
GURU


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

PostPosted: Thu Sep 20, 2012 12:26 am   
 
you have it backwords

%ismember(petitioner, @list)
_________________
Discord: Shalimarwildcat
Reply with quote
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Thu Sep 20, 2012 1:27 am   
 
Thanks - changed it around but still not working

alias test

value

#if (%ismember( @symptom, @Dlist1)) {7} {#if (%ismember( @symptom, @list2)) {6} {#if (%ismember( @sympton, @list3)) {#SEND %db( @HerbDB, %i)} {noop}}}

so to test i put value testv into @symptom
I also put testv|testa|testb|testc into @list3
then put
testv|say v
testa|say a
testb|say b
into @HealDB

so when i enter alias test I should get a response of say v but its not happening - have been trying to get it right for few days but i am not understanding it that well - any ideas

sorry to be such a basic newbie but am trying
Reply with quote
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Thu Sep 20, 2012 1:28 am   
 
sorry i have a spell mistake it is list1 not dlist1 but it still doesnt work
Reply with quote
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Thu Sep 20, 2012 3:14 pm   
 
tried another way also

#forall @symptom {#if %ismember( %i, @list1) {match={7}} {#if %ismember( %i, @list2)} {match={6}} {#if %ismember( %i, @list3) {match=SEND %db( @HerbDB, %i)}}}

Nothing still not happening - not sure what to try now
Reply with quote
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Thu Sep 20, 2012 5:40 pm   
 
ok i solved like this not sure if its the best way but at least it works

#if (%numitems( @list1)>0) {#FOR @list1 {#SEND %db( @HerbDB, %i)}} {#IF (%numitems( @list2)>0) {#FOR @list2 {#SEND %db( @HerbDB, %i)}} {#IF (%numitems( @list3)>0) {#FOR @list3 {#SEND %db( @HerbDB, %i)}}}}
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