[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Compiling the server
. . -> [Subject]  Need help with bounty snippet error during compile..
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Need help with bounty snippet error during compile..

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


Posted by Wrath   USA  (25 posts)  [Biography] bio
Date Wed 11 Aug 2004 04:18 AM (UTC)

Amended on Wed 11 Aug 2004 04:43 AM (UTC) by Wrath

Message
Here is the error message I'm getting.

c:\download\mud\startermudv3\rom24\src\bounty.c(225) : error C2039: 'bank_gold' : is not a member of 'pc_data'
c:\download\mud\startermudv3\rom24\src\merc.h(1521) : see declaration of 'pc_data'

This is the line in bounty.c

extract_obj(obj);
do_say(vch,"Very well, here is your payment.");
ch->pcdata->bank_gold += bounty->amount;

Do I need to edit something in the merc.h file to allow this payment to take place there are 21 total errors all refering to the declaration of 'pc_data' in merc.h. the entire bounty.c file is located at link below.

Assign ACT_BOUNTY to a free act flag. is the only random entry that was made to my merc.h

#define ACT_IS_HEALER (aa)
#define ACT_GAIN (bb)
#define ACT_UPDATE_ALWAYS (cc)
#define ACT_IS_CHANGER (dd)
#define ACT_BOUNTY (ee)

Any ideas I tried for hours now and can't quit figure out what i've done wrong. Here is the complete snippet info if needed. http://home.comcast.net/~cyberaww/full-bounty.txt




Always remember he who increses knowledge increses sorrow.
And he who thinks mudding is easy is allways sorry.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #1 on Wed 11 Aug 2004 04:43 AM (UTC)
Message
Seems like maybe you didn't add bounty.c to your makefile going strictly by the link errors.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Wrath   USA  (25 posts)  [Biography] bio
Date Reply #2 on Wed 11 Aug 2004 04:47 AM (UTC)
Message
Thanks you are correct in that I posted the wrong info I solved that part and updated the post to the correct question. Sorry about that thanks for responding.

Always remember he who increses knowledge increses sorrow.
And he who thinks mudding is easy is allways sorry.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #3 on Wed 11 Aug 2004 04:53 AM (UTC)
Message
Seems like the bank_gold is not a part of pc_data. Check merc.c to see what structure it is in.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Wrath   USA  (25 posts)  [Biography] bio
Date Reply #4 on Wed 11 Aug 2004 04:57 AM (UTC)
Message
You mean in merc.h I don't have a merc.c ? If so how would I add the bank_gold to the pcdata section? this is what I have.

* Data which only PC's have.
*/
struct pc_data
{
PC_DATA * next;
BUFFER * buffer;
bool valid;
char * pwd;
char * bamfin;
char * bamfout;
char * title;
time_t last_note;
time_t last_idea;
time_t last_penalty;
time_t last_news;
time_t last_changes;
sh_int perm_hit;
sh_int perm_mana;
sh_int perm_move;
sh_int true_sex;
int last_level;
sh_int condition [4];
sh_int learned [MAX_SKILL];
bool group_known [MAX_GROUP];
sh_int points;
bool confirm_delete;
char * alias[MAX_ALIAS];
char * alias_sub[MAX_ALIAS];
int security; /* OLC */ /* Builder security */
sh_int startyear;
sh_int startmonth;
sh_int startday; /* beginings of age code */
int age_mod; /* for youth spells, etc */
char * host; // Host information

};

Always remember he who increses knowledge increses sorrow.
And he who thinks mudding is easy is allways sorry.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #5 on Wed 11 Aug 2004 04:58 AM (UTC)
Message
Looks like they've called some things that aren't quite stock ROM pc_data struct compliant. Look in merc.h right around the line number it gives you and check how your pc_data struct references banked gold.

Also in the future as a kindness to other coders just starting out or having similar troubles, when you solve a problem and encounter a new one leave the original issue up and add another post. Answers out of context to their questions don't make a lot of sense usually, even to the people answering the original questions.

(Feel free to smack me around if I'm stepping on your toes here Nick :)

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Wrath   USA  (25 posts)  [Biography] bio
Date Reply #6 on Wed 11 Aug 2004 05:03 AM (UTC)
Message
I added int bank_gold; & int bank_silver to hte merc.h file and it seems to have removed the errors for now. You are correct about my first post I would have left it if i had noticed you replied to it but I was changing it and thought when I did that the original post was not seen by other people. I am sorry about that. Thanks for all the help though this site is very helpful.

Always remember he who increses knowledge increses sorrow.
And he who thinks mudding is easy is allways sorry.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #7 on Wed 11 Aug 2004 05:04 AM (UTC)

Amended on Wed 11 Aug 2004 05:06 AM (UTC) by Meerclar

Message
Hehe, gotta love posts being written as new info is being posted :P Anyway, bank_gold doesn't seem to be part of the stock pc_data struct so you need to either add it to the struct with appropriate code elsewhere (and maybe a banking system to go with it) OR you can simply change how the bounty is paid - have the Fairy Mofia deliver payments or something :) Probably the easiest route is to simply directly add the gold to the characters current carried gold instead of trying to autobank.


****edit****
HAHA, twice in the same night in the same thread, couldn't have done it any better if I'd tried.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #8 on Wed 11 Aug 2004 05:13 AM (UTC)

Amended on Wed 11 Aug 2004 05:14 AM (UTC) by Zeno

Message
I'm not one who knows much about Rom, but hell, its sure like Smaug, so I knew it pretty well. 'course both derive from Merc/Diku, so thats why. If ya got anymore problems, feel free to post. Every one makes errors.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Thu 12 Aug 2004 07:25 AM (UTC)
Message
Quote:

Also in the future as a kindness to other coders just starting out or having similar troubles, when you solve a problem and encounter a new one leave the original issue up and add another post.


Yes, I agree. There is a larger issue here than a single person solving a problem. The point of the forum is for the answer to be available to others so they can solve the same, or a similar, problem in the future.

If we don't see the solution, then we are foreever having to solve the same problem, which isn't always convenient if the person who happens to know the answer is asleep, for example.

Similarly, it is infuriating when we see a post about a complex problem, and then a final line "I solved the problem myself". It would be nice for the actual solution to be posted as part of the posting.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


6,924 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]