Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Need Help! (http://www.topmudsites.com/forums/showthread.php?t=462)

TheDemonMaster 11-08-2002 07:47 PM


Loriel 11-08-2002 09:24 PM

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).

Torren 11-12-2002 10:35 AM

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


All times are GMT -4. The time now is 01:23 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022