PC_Data Struct

Posted by Leprakon on Tue 22 Jul 2003 01:05 AM — 4 posts, 19,556 views.

#0
Hello,

I'm using FUSS (Fixed Up Smaug Source), and i tried to install the Alias Snippet from Alsherok.net, but it has me do something to the PC_Data Struct in mud.h, and It's Not There! It's declared in the beginning, but it's never actually used anywhere else in the file. What's the deal with that? Is that a bug that FUSS didn't fix? Thanks..
USA #1
Not quite sure what you mean by "not there" but I'm working with a recent version of FUSS and I decided to take a look at that snippet you were talking about.

The only part of the entire snippet install instructions which even mention pc_data struct are;


In the pc_data struct, add the following to the end:

    ALIAS_DATA *	first_alias;
    ALIAS_DATA *	last_alias;


I opened up the mud.h which my FUSS release came with and I have no problem finding the pc_data struct section. It begins, in my case, at line 2386, with a comment that reads;


/*
 * Data which only PC's have.
 */


Now, scrolling down to the end there's this:



    char *		prompt;		/* User config prompts */
    char *		fprompt;	/* Fight prompts */
    char *		subprompt;	/* Substate prompt */
    sh_int		pagerlen;	/* For pager (NOT menus) */
    bool		openedtourney;
    IGNORE_DATA	*	first_ignored; 	/* keep track of who to ignore */
    IGNORE_DATA	*	last_ignored;    
    char **		tell_history;	/* for immortal only command lasttell */
    sh_int		lt_index;	/* last_tell index */
    sh_int	colorize	[AT_MAXCOLOR];



All you need to do is throw the above two lines in right here.

Is your mud.h somehow different from this or missing this section? I don't really see how it could be, so maybe you just overlooked it. In any event, I hope this helps.
Amended on Tue 22 Jul 2003 03:37 AM by Gatewaysysop2
#2
lol thanks... i found it now- i think the reason that i couldn't find it before was that a was searching for PC_DATA, not pc_data, i dunno, in any case, i found it now, thanks a lot. I can finally install aliases now
USA #3
Heh, don't run into the same problems I had. Its a simple fix. If you have a bunch of errors as it did, add in the include for stdio.h in either alias.c/alias.h/mud.h. Should look like this if your new to headers and what not:

#include <stdio.h>

Then again, I was using SWR 1.0, so you might not have those problems.