BroadcastLua() Help

Ive been having some trouble with this sent for a gamemode that im working on

In the code i have

[lua]
BroadcastLua( “GAMEMODE:SendMessage( [[<color=ltgrey><font=HUDFontBig>]]…message…[[</font></color>]])” )
[/lua]

Can you even use globals in SendLua() And BroadcastLua() and yes I have my global defined.

Please tell me if I am just stupid or I am just doing it wrong.

Oh ya BTW here is the error code

[LuaCmd:1] attempt to concatenate global ‘message’ (a nil value)
D

[lua]
BroadcastLua( “GAMEMODE:SendMessage( [[<color=ltgrey><font=HUDFontBig>]]”…message…"[[</font></color>]])" )
[/lua]

That should work, I think.

However, you really should use usermessages instead.

message is a nil value

Oh really??

Now seriously, it probably is nil since the variable “message” does not exist on the client.

nope

[lua]function ENT:ShowMessage( activator, caller, message)

	BroadcastLua( "GAMEMODE:SendMessage([[&lt;colorltgrey&gt;&lt;font=HUDFontBig&gt;]]..message..[[&lt;/font&gt;&lt;/color&gt;]])" )

Msg( “Printed: “…message…” Successfully”)
end
[/lua]
Outcome

Printed: Welcome to Gamemode. Successfully

but that SendMessage is pretty much a draw and it works fine

As I said, you have to get “message” out of the string and concat it as in my example.

did and I got this

[LuaCmd:1] ‘)’ expected near ‘Welcome’

Ill prob use user messages soon hehe

Is message defined on the client?

its fine I did usermessages and worked great

thanks though