Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register


This is a discussion on "Need Help!" in the Top Mud Sites MUD Coding forum :

I am trying to get the double exp code in and ran into this problem! act_wiz.c: In function `do_doublexp': act_wiz.c:5797: `doublexp' undeclared (first use in this function) act_wiz.c:5797: (Each undeclared identifier is reported only once act_wiz.c:5797: for each function it appears in.) act_wiz.c:5809: warning: implicit declaration of function `do_announce' make: *** [act_wiz.o] Error 1 Could someone explain as to what i am looking for? So i can learn. Thanks!  ...



You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today!

If you have any problems with the registration process or your account login, please contact us.

If you are a registered member of the old TMS forums, please click here
Reply
 
LinkBack Thread Tools
Old 11-08-2002, 07:47 PM   #1
TheDemonMaster
Member
 
Join Date: May 2002
Location: Maryland
Posts: 54
TheDemonMaster is on a distinguished road
Send a message via AIM to TheDemonMaster Send a message via MSN to TheDemonMaster Send a message via Yahoo to TheDemonMaster
Talking

I am trying to get the double exp code in and ran into this problem!

act_wiz.c: In function `do_doublexp':
act_wiz.c:5797: `doublexp' undeclared (first use in this function)
act_wiz.c:5797: (Each undeclared identifier is reported only once
act_wiz.c:5797: for each function it appears in.)
act_wiz.c:5809: warning: implicit declaration of function `do_announce'
make: *** [act_wiz.o] Error 1

Could someone explain as to what i am looking for? So i can learn.

Thanks!
 
TheDemonMaster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-08-2002, 09:24 PM   #2
Loriel
Member
 
Join Date: May 2002
Posts: 49
Loriel is on a distinguished road
Your problem is in line 5797 of act_wiz.c.

The word "doublexp" is not being recognised by the compiler.

This usually arises because you are using a function that is "not known" at this point - generally because it lies in a different file.

This problem is solved by "declaring" that function in the main header file (merc.h, mud.h, or whatever your version is called) - this effectively tells the compiler "Don't worry about it now - it'll get sorted out later (at linking)".

Alternatively the function you are referring to might occur later in the same file - similar solution, declare it which means "Don't worry about it, it will get fixed later".

Declaring means just entering the opening line of the function, including the parameter/argument types, followed by a semicolon - eg:
void my_function(int, char);

Thus the problem usually arises because the "other" function has not been declared in the header file, or an out-of-date version of the header file is used somewhere in the code (ie you should have ensured it was all updated by using "make clean"), or possibly the other file where it is actually found hasn't been included (ie the "new" file hasn't been added to the list of .o files in the makefile).

However, it's also worth checking if you have a typo on that line - ie it's looking for the "wrong thing" in some way.

If none of these works, post the offending line (with a few lines either side).
Loriel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-12-2002, 10:35 AM   #3
Torren
New Member
 
Join Date: Apr 2002
Posts: 28
Torren is on a distinguished road
Helps if you tell us which code base. I see act_wiz.c I'm going out on a limb and say a Diku/Merc flavor.
Silly me when I declare a fuction I use the args var
i.e.
void check_sex args( ( CHAR_DATA *ch) );
Now the next question is. What is doubleexp inside the do_doublexp function? Is it a var or is it a function call? if its a var then you'll have to define it at the begin of the function at the very least or in a loop/if statment.
With your second error you trying to call the function
do_announce, again I'm going to assume your using Merc/Diku/Rom/Rot and the function should be
do_announcement. How ever this function just turns the announcements on and off. If you wanted to announce something to the whole mud, use the announcement function.

Torren
Torren is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 07:47 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Style based on a design by Essilor
Copyright Top Mud Sites.com 2007