Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » roster help
Forum Rules | Mark all | Recent Posts

roster help
< Newer Topic :: Older Topic > need help with the roster snippet

Pages:<< prev 1 next >>
Post is unread #1 Oct 21, 2005, 5:35 am
Go to the top of the page
Go to the bottom of the page

gorock

GroupMembers
Posts5
JoinedOct 21, 2005

ok i donwloaded the roster snippet and first of i had to comment out a piece of code in void do_roster the entire section with ctime in it i had to comment out and also i cant seem to figure out how roster works and on the install page i did not see any instructions so i thought it was automatic it just picked up the clans and added them but it didnt so i guess i have to but any help on this would be good i dont know why it would not let me use ctime or anything in the code. thanks in advance. here is the code that was commented there was a parse error before ; in the line with total++; and also the ctime error it said it wasnt a function


void do_roster( CHAR_DATA *ch, char *argument )
{
CLAN_DATA *clan;
ROSTER_DATA *roster;
char arg[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH];
int total = 0;

if( IS_NPC(ch) )
{
send_to_char( "NPCs can't use this command.\r\n", ch );
return;
}

if( !argument || argument[0] == '\0' )
{
send_to_char( "Usage: roster <clanname>\r\n", ch );
send_to_char( "Usage: roster <clanname> remove <name>\r\n", ch );
return;
}

argument = one_argument( argument, arg );
if( !( clan = get_clan( arg ) ) )
{
ch_printf( ch, "No such guild or clan known as %s\r\n", arg );
return;
}

if( !argument || argument[0] == '\0' )
{
ch_printf( ch, "Membership roster for the %s %s\r\n\r\n", clan->name,
clan->clan_type == CLAN_ORDER ? "Guild" : "Clan" );
ch_printf( ch, "%-15.15s %-15.15s %-6.6s %-6.6s %-6.6s %s\r\n", "Name", "Class", "Level", "Kills", "Deaths", "Joined on" );
send_to_char( "-------------------------------------------------------------------------------------\r\n", ch );
for( roster = clan->first_member; roster; roster = roster->next )
/* {
ch_printf( ch, "%-15.15s %-15.15s %-6d %-6d %-6d %s",
roster->name, capitalize( npc_class[roster->Class] ), roster->level, roster->kills, roster->deaths,
ctime( &roster->joined ) );
total++;
}*/
ch_printf( ch, "\r\nThere are %d member%s in %s\r\n", total, total == 1 ? "" : "s", clan->name );
return;
}
       
Post is unread #2 Oct 21, 2005, 10:55 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

If you've coded it in properly, which shouldn't be that difficult, then go online and do:
cedit create roster
cedit roster level <whatever level you want this command>
cedit save cmdtable
then it is mostly automatic, each time someone joins a guild/order/clan they will be added to the roster, I don't recall whether the snippet told you how or if it's just something I'd done myself, but I've also got mine set to check logons so that each time someone logs on, if they are a member of a guild/clan/order they also get added to the roster if they weren't already there. Once you've got some folks on the list, you can do roster <guild/order/clan name> and get a list of the members of that guild/order/clan that have been online/inducted since you installed the snippet.
       
Post is unread #3 Oct 21, 2005, 11:57 am
Go to the top of the page
Go to the bottom of the page

gorock

GroupMembers
Posts5
JoinedOct 21, 2005

i did add roster i did cedit roster create do_roster but it still shows noone even though people in clans are online
       
Post is unread #4 Oct 21, 2005, 7:22 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Were they online already? It works on mine. :(
       
Post is unread #5 Oct 21, 2005, 7:29 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

That would be because you commented out the code which would have been responsible for displaying that. You should not be getting compile errors on a properly configured system. If you are, then post those here so this can be fixed properly.
       
Post is unread #6 Oct 22, 2005, 3:17 pm
Go to the top of the page
Go to the bottom of the page

gorock

GroupMembers
Posts5
JoinedOct 21, 2005

ok the part that says

ctime( &roster->joined ) );
total++;

does not want to work it makes me have a compile error

it says implicit declaration of function ctime
       
Post is unread #7 Oct 22, 2005, 4:43 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Add:

#include <time.h>


To the top of your clans.c file.
       
Post is unread #8 Oct 22, 2005, 10:12 pm
Go to the top of the page
Go to the bottom of the page

gorock

GroupMembers
Posts5
JoinedOct 21, 2005

ok it works right now but when im in the mud and type roster (clan) it just shows like all i typed was roster i looked at the code it looks right and i did roster (clan) remove (player name) and that worked but i type roster (clan) and it just says

Usage: roster <clanname>
Usage: roster <clanname> remove <name>

any help
thanks
       
Post is unread #9 Oct 22, 2005, 11:37 pm
Go to the top of the page
Go to the bottom of the page

gorock

GroupMembers
Posts5
JoinedOct 21, 2005

ok its working when i do roster (clan) but no names show up even though people are in the clan
       
Post is unread #10 Oct 24, 2005, 1:09 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Did you remember to remove that comment you added?
       
Pages:<< prev 1 next >>