#21 Oct 23, 2009 3:06 pm
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
#22 Oct 23, 2009 3:14 pm
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.
#23 Oct 23, 2009 4:51 pm
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.
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.
#24 Oct 23, 2009 6:11 pm
GroupMembers
Posts600
JoinedDec 3, 2008
so I made
to just be
Is that what you ment?
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?
#25 Oct 23, 2009 6:19 pm
GroupMembers
Posts600
JoinedDec 3, 2008
The next Problem is
house.c:1658: warning: passing argument 1 of 'delete_reset' from incompatible pointer type
so I what I did was make it read
Let me know if that's what it should be, I believe this is deleting the resets if the house is removed.
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.
#26 Oct 23, 2009 6:23 pm
GroupMembers
Posts600
JoinedDec 3, 2008
And the last error was.
house.c:1774: error: too few arguments to function 'make_room'
so I made this
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.
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.
#27 Oct 23, 2009 6:36 pm
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.
#28 Oct 23, 2009 6:43 pm
Last edited Oct 23, 2009 7:13 pm by 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.