Channel varible problem

Posted by MasterJay on Thu 14 Oct 2004 12:53 AM — 2 posts, 12,985 views.

#0
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; 
Canada #1
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.