[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  Tinymudserver, room descriptions, and room names
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Tinymudserver, room descriptions, and room names

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


Posted by Metsuro   USA  (389 posts)  [Biography] 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
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] 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:

string name;


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
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] 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
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] 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
[Go to top] 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.


4,585 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]