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, confirm your email, resolve issues, 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Hotboot Snippet

Hotboot Snippet

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


Posted by Yourdrunkendad   (35 posts)  Bio
Date Sun 10 Aug 2003 04:04 PM (UTC)
Message
I'm trying to implement Samsons hotboot snippet into my mud. The one from alsherok.net. I'm compiling with Cygwin in WindowsXP. However when I do so I'm getting the following errors during the compile:

In file included from mud.h:348,
from act_comm.c:32:
hotboot.h:41: field 'hotboot_recover" declared as a function
hotboot.h:42: field 'load_world' declared as a function
hotboot.h:44: field 'do_hotboot' declared as a function
make[1]: *** [act_comm.o] Error 1
make[1]: Leaving directory '/home/jimmy scrabes/smaug/src'
make: *** [all] Error 2


can anyone help me out?

Shampoo is for sissies real men use poo*
[werd]thewerd.com "Smacking Your Mom Then Running Away"
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #1 on Sun 10 Aug 2003 06:42 PM (UTC)
Message
For clarification purposes - lines 41-44 in hotboot.h are:


void hotboot_recover( void );
void load_world( CHAR_DATA *ch );

DECLARE_DO_FUN( do_hotboot ); /* Hotboot command - Samson 3-31-01 */


As advised by myself, he's already tried changing the first 2 to:

void hotboot_recover args( ( void ) );
void load_world args( ( CHAR_DATA *ch ) );

But that didn't change anything. I wasn't sure how to handle the DECLARE_DO_FUN part, especially since I'm running the latest Cygwin and wasn't able to reproduce a similar situation.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 10 Aug 2003 11:20 PM (UTC)

Amended on Sun 10 Aug 2003 11:22 PM (UTC) by Nick Gammon

Message
Yes, I see what the problem is. :)

The instructions from Samson and others say:


   Then locate the following code:

/*
 * Structure for extended bitvectors -- Thoric
 */
struct extended_bitvector
{
    unsigned int		bits[XBI]; 
   /* Needs to be unsigned to compile in Redhat 6 - Samson */
};

   Directly below that, add the following:

#include "hotboot.h"



So, your code should look like this:


/*
 * Structure for extended bitvectors -- Thoric
 */
struct extended_bitvector
{
    int		bits[XBI];
};

#include "hotboot.h"



However you have put the include at line 348 (see your error message). That means you put it at the wrong place, inside the structure, like this:


/*
 * Structure for extended bitvectors -- Thoric
 */
struct extended_bitvector
{
    int		bits[XBI];
#include "hotboot.h"  // line 348 
};


If you do that, you get that exact error message. Move the include to below the closing "};" as instructed in the original instructions.



- Nick Gammon

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

Posted by Yourdrunkendad   (35 posts)  Bio
Date Reply #3 on Mon 11 Aug 2003 12:52 AM (UTC)

Amended on Mon 11 Aug 2003 12:56 AM (UTC) by Yourdrunkendad

Message
Thanks guys, Samson & Gammon for providing the codes for the community and helping out morons like me make them work. You were right about the #include hotboot.h being inside the function instead of after it.

However when I fixed that I was still getting the exact same errors, so before I posted again harassing you guys, I went through the whole snippet installation process again, and then again just to make sure. Everything was absolutely perfect and it still wouldn't work.

This information is for anyone else who has/will encounter this or a similar problem since I know these forums are saved and searchable.

I use the following codebase:

http://www.gammon.com.au/files/smaug/smaug1.4a_mxp.tgz

Compiled using Cygwin DLL release version is 1.3.22-1
In a WindowsXP environment, Service Pack 1 installed
On an AthlonXP 1900+

To make the snippet work I followed the instructions exactly, except for the instruction to put #include hotboot.h into mud.h. Instead I simply added hotboot.h, hotboot.c, and hotboot.o to their respective areas in the makefile. Did a make clean/make
...joined the game, added command using:

cedit hotboot create do_hotboot

... and I am pleased to say it now works perfectly.
Hopefully this helps someone out there.

Shampoo is for sissies real men use poo*
[werd]thewerd.com "Smacking Your Mom Then Running Away"
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.


14,146 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.