Mailing List
Home
Forum Home
Mac Game - Mac game development
Rivers of MUD - a Diku and Merc based multiuser dungeon
SMAUG
Subjects
Getting UDP through NAT/firewalls/whatever for a game
Getting UDP through NAT/firewalls/whatever for a game
QuickTime errors
Python script as stand alone MUD server
Subject: Various sound problems
Fragment Shaders & GL TEXTURE RECTANGLE EXT
Subject: Timers and global variables
Re: Language and platform for Text MUD server
Apparent acquisition of Yantis (mysupersales) by IDE
HID keyboard
Getting UDP through NAT/firewalls/whatever for a game
Microsoft Sparkle
Subject: Director MX
Congratulations Horizons
Yet more problems fullscreen mode
Apple Dev Kitchen Them 's tasty vittles, Maw!
NSOpenGLContext, Pbuffers, and drawables
More DCR "theft " naughtiness
dynamic sprite creation and imaging lingo
Re: Find stuff in Flash array?
Effects of skill imbalances?
QuickTime errors
Rom 2 4/Quickmud Enhancement/Bug fix
Subject: Working with XML files/CFURL
smooth scrolling/subpixel tweening
RE: (Ron help me?) Flash text
Subject: Flash Racing
Subject: MudDev FAQ 2
Browser based games
Installing GLUT
Special character in Flash XML
 
readding grub.c problems

readding grub.c problems

2005-05-06       - By Christopher Lengel

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

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