Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Sysdata

Sysdata

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Findecano_Elendil   United Kingdom  (9 posts)  Bio
Date Sun 22 Nov 2009 12:43 AM (UTC)
Message
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.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Sun 22 Nov 2009 01:20 AM (UTC)
Message
There should be an extern declared to allow this to be used elsewhere.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Findecano_Elendil   United Kingdom  (9 posts)  Bio
Date Reply #2 on Sun 22 Nov 2009 01:22 AM (UTC)
Message
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...
Top

Posted by Nick Gammon   Australia  (23,070 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 22 Nov 2009 01:28 AM (UTC)
Message
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;





- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Findecano_Elendil   United Kingdom  (9 posts)  Bio
Date Reply #4 on Sun 22 Nov 2009 01:34 AM (UTC)
Message
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 =)
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #5 on Wed 25 Nov 2009 09:16 AM (UTC)
Message
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?
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,919 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.