Cuberite Forum

Full Version: Error when using cRoot.BroadcastChat
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have some code that is basically this:
local ChatMsg=cCompositeChat()
    :AddTextPart"a"
    :AddTextPart"b"
cRoot:BroadcastChat(ChatMsg)
When I do that, I get this:
Code:
[22:07:00] LUA: Plugins/(removed, lel)/main.lua:61: error in function 'BroadcastChat'.
     argument #1 is 'class cRoot'; 'cRoot' expected.
Fixed it. For those who have this issue in the future, use cRoot:Get():BroadcastChat()