Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 1:06 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 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, 1:14 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
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, 2:51 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
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, 4:11 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 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, 4:19 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 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, 4:23 pm
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 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, 4:36 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
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, 4:43 pm   Last edited Oct 23, 2009, 5:13 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2
Sorcerer
GroupMembers
Posts600
JoinedDec 2, 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 >>