Login
User Name:

Password:



Register

Forgot your password?
 I3 and IMC
Dec 26, 2024 3:27 am
By GatewaySysop
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
LOP 1.6
Author: Remcon
Submitted by: Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
Users Online
There are currently no members online.

Members: 0
Guests: 18
Stats
Files
Topics
Posts
Members
Newest Member
496
3,808
19,708
594
MaisieMacl

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » General » Smaug Snippets » Housing ::crackle::
Forum Rules | Mark all | Recent Posts

Housing ::crackle::
< Newer Topic :: Older Topic > Being curious...

Pages:<< prev 1, 2 next >>
Post is unread #21 Oct 23, 2009 3:06 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 

Findecano said:

A real old one... one for 1.4a Smaug I believe. Thats why im wondering if anyone has a more up todate version of it? One possible that is a little less buggy for SmaugFUSS? heh.

http://www.mudbytes.net/index.php?a=files&s=viewfile&fid=2399

Post is unread #22 Oct 23, 2009 3:14 pm   
Go to the top of the page
Go to the bottom of the page

InfiniteAxis
Off the Edge of the Map
GroupAdministrators
Posts1,200
JoinedMar 21, 2006

 
It's really not all that difficult to learn the resets and update the snippet for yourself. It's also probably better in the long run as you'll actually understand the code, and be able to trouble shoot it yourself.

Post is unread #23 Oct 23, 2009 4:51 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
Good point kayle but sometimes have to at least point them in the right direction.
Ok, so on to what are the problems your having....

I recall someone saying there was a problem with is_room_reset being undefined. The reason being that resets are room based now instead of area based. From what I can tell of the housing snippet (once I found it, thanks for pointing out there was a link to it in one of the earlier post), you could just skip doing the whole little part that has the is_room_reset in it and instead just do wipe_resets( location ) for example.

Post is unread #24 Oct 23, 2009 6:11 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
so I made

	 for ( mreset = location->area->first_reset; mreset; mreset = mreset_next )
	 {
		 mreset_next = mreset->next;

		 if ( is_room_reset( mreset, location, location->area ) )
			 delete_reset( location->area, mreset );

	 }

to just be
    wipe_resets( location );


Is that what you ment?

Post is unread #25 Oct 23, 2009 6:19 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
The next Problem is

house.c:1658: warning: passing argument 1 of 'delete_reset' from incompatible pointer type

       for ( mreset = addloc->first_reset; mreset; mreset = mreset_next )
                        {
                                mreset_next = mreset->next;
                                delete_reset( addloc->area, mreset );
                        }



so I what I did was make it read
       for ( mreset = addloc->first_reset; mreset; mreset = mreset_next )
                        {
                                mreset_next = mreset->next;
                                delete_reset( mreset );
                        }



Let me know if that's what it should be, I believe this is deleting the resets if the house is removed.

Post is unread #26 Oct 23, 2009 6:23 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
And the last error was.
house.c:1774: error: too few arguments to function 'make_room'


              if ( (get_room_index( i )) == NULL )
                {
                        if ( (addloc = make_room(i)) == NULL)
                                return FALSE;

                        break;
                }
        }


so I made this

              if ( (get_room_index( i )) == NULL )
                {
                        if ( (addloc = make_room(i, 0)) == NULL)
                                return FALSE;

                        break;
                }
        }


I did that because that's how a check like this is done in mapout.c so I not sure if I did the right thing here.

Post is unread #27 Oct 23, 2009 6:36 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 

so I made
	 for ( mreset = location->area->first_reset; mreset; mreset = mreset_next )
	 {
		 mreset_next = mreset->next;

		 if ( is_room_reset( mreset, location, location->area ) )
			 delete_reset( location->area, mreset );

	 }

to just be
    wipe_resets( location );


Is that what you ment?

Yes thats what I ment.


The next Problem is

house.c:1658: warning: passing argument 1 of 'delete_reset' from incompatible pointer type
       for ( mreset = addloc->first_reset; mreset; mreset = mreset_next )
                        {
                                mreset_next = mreset->next;
                                delete_reset( addloc->area, mreset );
                        }

so I what I did was make it read
       for ( mreset = addloc->first_reset; mreset; mreset = mreset_next )
                        {
                                mreset_next = mreset->next;
                                delete_reset( mreset );
                        }

Let me know if that's what it should be, I believe this is deleting the resets if the house is removed.

Nope I would also change that to wipe_resets( addloc );

More or less it just wants to remove all the resets in the room correct?


And the last error was.
house.c:1774: error: too few arguments to function 'make_room'
              if ( (get_room_index( i )) == NULL )
                {
                        if ( (addloc = make_room(i)) == NULL)
                                return FALSE;

                        break;
                }
        }

so I made this
              if ( (get_room_index( i )) == NULL )
                {
                        if ( (addloc = make_room(i, 0)) == NULL)
                                return FALSE;

                        break;
                }
        }

I did that because that's how a check like this is done in mapout.c so I not sure if I did the right thing here.

For that one I think you can change make_room(i, 0) to make_room( i, pArea ); at least from what I see in the house.c file.

Post is unread #28 Oct 23, 2009 6:43 pm   Last edited Oct 23, 2009 7:13 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 


The next Problem is

house.c:1658: warning: passing argument 1 of 'delete_reset' from incompatible pointer type
       for ( mreset = addloc->first_reset; mreset; mreset = mreset_next )
                        {
                                mreset_next = mreset->next;
                                delete_reset( addloc->area, mreset );
                        }

so I what I did was make it read
       for ( mreset = addloc->first_reset; mreset; mreset = mreset_next )
                        {
                                mreset_next = mreset->next;
                                delete_reset( mreset );
                        }

Let me know if that's what it should be, I believe this is deleting the resets if the house is removed.

Nope I would also change that to wipe_resets( addloc );

More or less it just wants to remove all the resets in the room correct?

I believe so but not sure... So I took out all that and added wipe_resets( addloc);
like suggested and it seems to compile fine.

Pages:<< prev 1, 2 next >>