Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUDs
➜ General
➜ Tinymudserver, room descriptions, and room names
Tinymudserver, room descriptions, and room names
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Fri 15 Sep 2006 06:55 PM (UTC) |
Message
| Uh alright, with how tinymudserver comes it has the room name as part of the description and I wish to make it, its own thing. That way I can display the names and not the whole description. Anyway I could get help with setting that up? |
Everything turns around in the end | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #1 on Fri 15 Sep 2006 09:05 PM (UTC) |
Message
| First you need to add the data to the class. Find class tRoom and add:
Find the DoLook command and print out the name like so:
// show the room name
*p << r->name;
You will then need to modify the loading routine (and, eventually if you have OLC, the saving routine) to load an extra string:
string room_name;
getline( fRooms, room_name );
//sometime later after the room is created with new
//or you could modify the constructor
//this assumes the data is public
room->name = name;
With those fragments you should be able to modify it to do as you say. You will also need to modify the room data file by hand for each room to add the name to it (on its own line). |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #2 on Fri 15 Sep 2006 09:19 PM (UTC) Amended on Fri 15 Sep 2006 09:34 PM (UTC) by Metsuro
|
Message
| I got most of that figured already, the only problem I have is the loading... cant quiet seem to ever get it to work.
[EDIT] But thanks to your example I got it thank you very much! |
Everything turns around in the end | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #3 on Fri 15 Sep 2006 10:08 PM (UTC) |
Message
| Heh while we are at this, while your in the mud, and everyonce and awhile a > will pop up where is this located?? |
Everything turns around in the end | 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.
15,175 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top