RE: [SMAUG] readding grub.c problems

RE: [SMAUG] readding grub.c problems



No, it declares sex and the other criteria in gr_field_type as enums.

The fact that grub is still in the copy of fuss I have and the one that's
available for download, yet is missing from his at the moment and gets such
unusual errors would sort of suggest that whoever removed it in the first place
randomly moved some of its enums and/or structures into mud.h for some reason.

That's part of why I asked him what he's trying to do with it/get it to do.

-----Original Message-----
From: Josh Halls [mailto:xerves@rafermand.net] 
Sent: Friday, May 06, 2005 6:33 PM
To: Christopher Lengel
Cc: Smaug_Mailing_List
Subject: Re: [SMAUG] readding grub.c problems

Better question is why is there a global declaration of sex?  I think 
you missed the real question :-).

--Josh

Christopher Lengel wrote:
> I didn't post to have you question what I'm doing, I
> personally find those commands useful...
> I just wanted some help with the code, not comments on
> what I do with my time.
> --- Eos <Smaug@auricmud.com> wrote:
> 
>>The first question I'd have is why do you want it
>>back in?/What benefit(s) do you
>>think you'll gain from it?
>> 
>>
>>-----Original Message-----
>>From: Christopher Lengel [mailto:cplengel@yahoo.com]
>>
>>Sent: Friday, May 06, 2005 2:14 PM
>>To: Smaug_Mailing_List
>>Subject: [SMAUG] readding grub.c problems
>>
>>Hi,  I am attempting to readd grub.c to smaugFuss
>>and
>>I am running into some problems. Does anyone know if
>>this is possible to begin with? If it is, can you
>>help
>>me figure out these bugs? I've been studying this
>>code
>>for a  while now, but I am far from an expert, any
>>help would be greatly appreciated.  Here are the
>>bugs
>>I'm getting:
>>
>>grub.c: In function `gr_read':
>>grub.c:1501: warning: declaration of `sex' shadows a
>>global declaration
>>grub.c:468: warning: shadowed declaration is here
>>grub.c:1502: warning: declaration of `class' shadows
>>a
>>global declaration
>>grub.c:468: warning: shadowed declaration is here
>>grub.c:1503: warning: declaration of `race' shadows
>>a
>>global declaration
>>grub.c:468: warning: shadowed declaration is here
>>grub.c:1506: warning: declaration of `clan' shadows
>>a
>>global declaration
>>grub.c:468: warning: shadowed declaration is here
>>grub.c:1509: warning: declaration of `council'
>>shadows
>>a global declaration
>>grub.c:468: warning: shadowed declaration is here
>>grub.c: In function `do_diagnose':
>>grub.c:2017: warning: declaration of `race' shadows
>>a
>>global declaration
>>grub.c:468: warning: shadowed declaration is here
>>grub.c:2017: warning: declaration of `class' shadows
>>a
>>global declaration
>>grub.c:468: warning: shadowed declaration is here
>>
>>Here is the specific code for each section:
>>460's
>>enum gr_field_type          /* enumerates the fields
>>in the input record */
>>   {name, sex, class, race, level, room, gold, clan,
>>council,
>>    site, last, pkill};
>>                                                    
>> 
>>                                                    
>> 
>>               
>>struct  gr_struct               /* input record
>>containing pfile info    */
>>{
>>   char    name [MAX_NAME_LENGTH];
>>   char    sex;
>>   char    class;
>>   char    race;
>>   char    level;
>>   short   room;
>>   long    gold;
>>   char    clan;
>>   char    council;
>>   char    site [MAX_SITE_LENGTH];
>>   long    last;
>>   char    pkill;
>>};
>>
>>1500's
>>void gr_read (
>>     CHAR_DATA *ch, int op_num, bool or_sw, int
>>dis_num)
>>{
>>  FILE *fp;
>>  bool res;                                 /*
>>result
>>of a boolean exp   */
>>  bool title_sw = FALSE;                    /* only
>>print title once     */
>>  int  tot_match = 0;                       /* total
>>records matched     */
>>  GR_STRUCT r;                              /* input
>>(physical record)   */
>>  char sex[]   = "NMF";                     /*
>>convert
>>sex to text       */
>>  char class[] = "MCTWVDRAPN";              /*
>>convert
>>class to text     */
>>  char race[][3] =                          /*
>>convert
>>race to text      */
>>  {"Hu", "El", "Dw", "Ha", "Px", "Va", "Og", "HO",
>>"HT", "HE", "Gi",
>>   "Dr", "SE", "Li", "Gn"};
>>  char clan[][4] = {
>>  "   ", "Gui", "DS ", "MS ", "RB ", "AR ", "Bru",
>>"Las","Nos", "Tre",
>>  "Ven", "Inc", "Baa", "Rol"};
>>  char council[][4] =
>>  {"   ", "CoE", "MC ", "NC ", "Pro", "PK ", "QC ",
>>"Neo", "Cod", "AC ",
>>   "Sym", "VC "};
>>
>>I understand that it is declaring these twice, but
>>I'm
>>really not sure how to fix it, do I keep the
>>declaration in the structure? or should I rename the
>>variables in the function?
>>Anything else that I'm missing on this?
>>Again thanks for any help in this matter.
>>
>>Chris Lengel
>>
>>aka Christian
>>http://nemesis.worldsofnemesis.org
>>
>>__________________________________________________
>>Do You Yahoo!?
>>Tired of spam?  Yahoo! Mail has the best spam
>>protection around 
>>http://mail.yahoo.com 
>>
>>
>>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
>