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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Channel varible problem

Channel varible problem

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


Posted by MasterJay   (23 posts)  [Biography] bio
Date Thu 14 Oct 2004 12:53 AM (UTC)
Message
I been changing the ways my channels look when used and they work except for what the player who typed it sees

for example: if Joe chats Hi he sees [chat] $n : Hi and others see [chat] Joe : Hi

i tried different variables there, but I cant get it to display anything. Is there some little thing to put in to make the code work?

btw heres the code :

case CHANNEL_CHAT:
	set_char_color( AT_GOSSIP, ch );
	ch_printf( ch, "[%s] $n : %s\n\r", verb, argument );
	sprintf( buf, "[%s] $n : $t", verb );
	break; 
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Thu 14 Oct 2004 03:50 AM (UTC)

Amended on Thu 14 Oct 2004 03:51 AM (UTC) by Greven

Message
If you are using ch_printf, you cannot use $*, the $n is only interpreted by act(). Use
ch_printf( ch, "[%s] %s : %s\n\r", verb, ch->name, argument );
That should show them their own name.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[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.


9,279 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 HostDash]