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.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Snippets format?

Snippets format?

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


Posted by Kalados   (17 posts)  Bio
Date Sun 15 Nov 2009 09:32 AM (UTC)
Message
I've got a guide (http://www.auricmud.com/snippets/new-channel.html) On how to make a channel, and I have no problem getting into those files and editing them just unsure as to where exactly I should put those snippets.

For example:

"You would add a line similar to this to add your 'ooc' channel to the 'channels' display."

Where exactly do I enter the code that follows? Just hit enter plug it in and indent?

If someone could point me in the right direction? Thanks.
Top

Posted by Hanaisse   Canada  (114 posts)  Bio
Date Reply #1 on Sun 15 Nov 2009 04:05 PM (UTC)
Message
Yes, that's pretty much it.

Looking at that snippet, once you find each line regarding the "yell" channel, simply return from the end of the line and copy/paste the "ooc" channel info they give.

For example, the first direction they give;
      ch_printf_color( ch, "%s", !IS_SET( ch->deaf, CHANNEL_YELL ) ? " &G+YELL" : " &g-yell" );
      ch_printf_color( ch, "%s",   !IS_SET( ch->deaf, CHANNEL_OOC )    ?
				                " &G+OOC"	          :
						" &R-ooc" );

Which kinda looks ugly so I would reformat it to remove the spaces in the 2 extra lines so that it all lines up into one.
ch_printf_color( ch, "%s",   !IS_SET( ch->deaf, CHANNEL_OOC ) ? " &G+OOC" : " &R-ooc" );


Continue the same with the rest of the new additional code lines, and don't forget to make clean when finished.

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
Top

Posted by Kalados   (17 posts)  Bio
Date Reply #2 on Sun 15 Nov 2009 05:21 PM (UTC)
Message
Thanks!
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.


12,393 views.

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.