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 ➜ SWR room flags (above BV30)

SWR room flags (above BV30)

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


Pages: 1  2 

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #15 on Thu 20 Mar 2003 02:35 AM (UTC)
Message
Can you show us the lines where you save, and also load, those flags? It is almost impossible to debug code simply by a description that "it doesn't work".

- Nick Gammon

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

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #16 on Thu 20 Mar 2003 10:40 PM (UTC)

Amended on Fri 21 Mar 2003 12:38 PM (UTC) by Nick Cash

Message
I think I understand. When I wrote the save/load I put the save in a differen't spot then the load. I think this is the problem, let me restate what to do here:


Under void fold_area():
Search for:
/* save rooms */

This will put you in the general area of code you need to be. Go down and find this:

fprintf( fpout, "0 %d %d %d %d %d \n", room->room_flags,
room->sector_type,
room->tele_delay,
room->tele_vnum,
room->tunnel );


This is what needs fixing, just look here:

fprintf( fpout, "0 %d %d %d %d %d %d\n",
room->room_flags,
room->sector_type,
room->tele_delay,
room->tele_vnum,
room->tunnel,
room->room_flags2 );

That should fix it, just put the room->room_flags2 at the bottom of the list so it reads in last becase thats how its loaded. If this doesn't work then tell me, I'll take a look at the problem again. If it works then post here again please, I'd like to know the end result. Hope it helps.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Crix   (11 posts)  Bio
Date Reply #17 on Fri 21 Mar 2003 10:03 PM (UTC)
Message
This is in fold_area:

fprintf( fpout, "0 %d %d %d %d %d %d\n", room->room_flags,
room->sector_type,
room->tele_delay,
room->tele_vnum,
room->tunnel,
room->room_flags2 );
else
fprintf( fpout, "0 %d %d %d\n", room->room_flags,
room->room_flags2,
room->sector_type );


this is in load_rooms:
sscanf( ln, "%d %d %d %d %d %d %d",
&x1, &x2, &x3, &x4, &x5, &x6, &x7 );

pRoomIndex->room_flags = x2;
pRoomIndex->room_flags2 = x7;
pRoomIndex->sector_type = x3;
pRoomIndex->tele_delay = x4;
pRoomIndex->tele_vnum = x5;
pRoomIndex->tunnel = x6;


I've put the stuff in for do_look, and it shows as the flag being set on the room. I've guessed on what the area file should look like, and I believe that's right also.
Thanks for the help.
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.


63,797 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

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.