TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#LIST

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
Roady



Joined: 28 Mar 2006
Posts: 25

PostPosted: Mon Mar 24, 2008 6:19 pm    Post subject: #LIST Reply with quote

Im having problems understanding how #LIST works.

I thought i had it all sorted, but i obviously dont. Im trying to maintain a list of members in a group. Ive figured out how to add members to the group, but for some reason i cant list the members in the group. Heres the code im using...

Code:
#ALIAS {AddGroupMember %0} {#LIST {GroupMembers} {INS} {-1} {%0}}
#ALIAS {DelGroupMember %0} {FindGroupMember %0; #LIST {GroupMembers} {DEL} {$MemberIndex}}

#ALIAS {FindGroupMember} {#LIST {GroupMembers} {FND} {%0} {MemberIndex}}

#ALIAS {ListGroup} {
  #LIST {GroupMembers} {LEN} {GroupMemberCount}
  #SHOWME {------- Group Members ---------}
  #LOOP {1 $GroupMemberCount} {#SHOWME [&0] $GroupMembers[&0]}}



When i try to use this code in the mud, it creates the group but for some reason wont list them...

Code:
417H 119V 327952X 45C 52 Exits:D>AddGroupMember Bob
417H 119V 327952X 45C 52 Exits:D>AddGroupMember Jane
417H 119V 327952X 45C 52 Exits:D>AddGroupMember Tom
417H 119V 327952X 45C 52 Exits:D>AddGroupMember Kate

417H 119V 327952X 45C 52 Exits:D>ListGroup
#MATH EXP: INVALID INPUT {&0}
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Tue Mar 25, 2008 12:06 pm    Post subject: Reply with quote

You forgot some ;'s.

It ought to work once you add 'm:

Code:

#ALIAS {ListGroup} {
  #LIST {GroupMembers} {LEN} {GroupMemberCount};
  #SHOWME {------- Group Members ---------};
  #LOOP {1 $GroupMemberCount} {#SHOWME [&0] $GroupMembers[&0]}}



Coffee
Back to top
View user's profile Send private message Send e-mail
Roady



Joined: 28 Mar 2006
Posts: 25

PostPosted: Tue Mar 25, 2008 7:01 pm    Post subject: Reply with quote

oh.. er.. yes, that works fine now..

probably should have caught that myself :P

thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group