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

Gammon Software Solutions forum

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

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

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Channel varible problem

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by MasterJay   (23 posts)  [Biography] bio
Date Thu 14 Oct 2004 12:53 AM (UTC)  quote  ]
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)  quote  ]

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.


1,383 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]