Sysdata

Posted by Findecano_Elendil on Sun 22 Nov 2009 12:43 AM — 6 posts, 26,235 views.

United Kingdom #0
This is a really stupid question, but I just cant see this... I'm actually ashamed to mention this one, but I just really don't see how this happens...

db.c seems to declare the SYSTEM_DATA sysdata; but this is only locally declared into db.c

Yet many over files such as act_wiz.c seems to be able to use this struct without any problems... so it must have been declared globally, somewhere? Right? I'm not just going crazy... please don't say I've missed something really obvious here. =(

I've looked in Mud.h and I cant see it there.. hmmm. Maybe I am just going crazy.
USA #1
There should be an extern declared to allow this to be used elsewhere.
United Kingdom #2
See, I thought that too... but I cant find this anywhere.

did a grep sysdata *.* > text.txt

And then tried to find extern inside this document... and nothing. Not a dime. Just doesn't make sense...
Australia Forum Administrator #3
What version of SMAUG do you have? In SmaugFUSS I have it at line 3529 in mud.h:


/*
 * Global variables.
 */
extern MPSLEEP_DATA *first_mpwait;  /* Storing sleeping mud progs */
extern MPSLEEP_DATA *last_mpwait;   /* - */
extern MPSLEEP_DATA *current_mpwait;   /* - */

extern const char *target_name;
extern const char *ranged_target_name;
extern int numobjsloaded;
extern int nummobsloaded;
extern int physicalobjects;
extern int last_pkroom;
extern int num_descriptors;
extern struct system_data sysdata;
extern int top_vroom;
extern int top_herb;


and earlier up:


typedef struct system_data SYSTEM_DATA;




United Kingdom #4
Hmmm, SmaugFUSS 1.9
Strange.. Its not there. But its answered my question anyways, I think its been removed... not to sure why that's missing.

But many thanks for finding this. I was nearly pulling my hair out =)
USA #5
It's most certainly there. On line 3529 of mud.h, right where Nick found it. If it's not in your file, then perhaps someone removed it locally?