Author Topic: Messageall Only displaying first word in wrong colour.  (Read 1137 times)

Well my messageall things not saying what i want it to say.

Heres what i got:
Code: [Select]
function serverCmdTeamPoints(%client){
messageclient(%client,'\c3%1 \c5 Have \c3%2 points',$Team1, $Team1Points);
messageclient(%client,'\c3%1 \c5 Have \c3%2 points',$Team2, $Team2Points);
}

It should be saying:

TeamName1 Have 0 points
TeamName2 Have 0 points

but instead it says

TeamName1
TeamName2

messageclient(%client,"","\c2" @ $Team1 @ "\c5 has " @ $Team1Points @ " points.");
messageclient(%client,"","\c2" @ $Team2 @ "\c5 has " @ $Team2Points @ " points.");

I don't really like %1 %2 etc, I just use @ / SPC / NL /etc.

The second argument is blank because there is no message callback (I think) which executes code clientside depending on what it is and affects the other arguments given. For example, in the items code:

Code: [Select]
messageClient(%cl, 'MsgItemPickup', '', %slot, nametoID(%item));
... Where 'MsgItemPickup' is:
1. A tagged string making it slightly faster to transmit
2. A trigger for clientside code editing the item slots on the GUI to show you have picked something up

You had the callback set as '\c3%1 \c5 Have \c3%2 points', unrecognised and defaulted to the normal one: Chat lines, with the line set as the third argument: $Team1. The red colour is because that is the default colour if none is set.

Thanks Space. Once again you've helped me =].