Clientside printmessage

Problem using player:PrintMessage clientside.

[lua]function WMOrderMsg (omsg)
local mode = omsg:ReadLong();
if mode == 0 then
LocalPlayer():PrintMessage(HUD_PRINTCENTER, “Warmelons moving to waypoint”);
elseif mode == 1 then
LocalPlayer():PrintMessage(HUD_PRINTCENTER, “Warmelons following target”);
elseif mode == 2 then
LocalPlayer():PrintMessage(HUD_PRINTCENTER, “Warmelons attacking target”);
LocalPlayer():PrintMessage(HUD_PRINTCENTER, “Invalid order mode ID received”);
usermessage.Hook(“WMOrderMsg”, WMOrderMsg);

Sound plays fine, but no text comes up, and no error is shown. What’s going on? It worked fine when I called it serverside.

Scrap that.

Wiki says print message is a server side function

I thought this was client side… Hmm.

Just make your own message system, the center chat thing is ugly anyway.

Apparently not. The wiki says shared, but:

lua_run_cl LocalPlayer():PrintMessage( HUD_PRINTCENTER, "Testing")

Doesn’t work.

Odd… Well the function is definitely client side too… because this works.

lua_run_cl LocalPlayer():PrintMessage( HUD_PRINTTALK, "Testing")

I guess HUD_PRINTCENTER is broken on client?

Sharpe, your link is to the global PrintMessage, not the player function. Unless I’ve been reading the wiki wrong, player:PrintMessage is shared.