01-30-2021, 08:55 AM
Hi there, I just started messing around with plugin making for cuberite, and cRoot doesent seem to be working.
The code in question is:
And the error is:
I hope you guys can solve my issue. Thanks!
The code in question is:
Code:
cRoot:BroadcastChat(cCompositeChat()
:AddTextPart(Player:GetName(), "@e")
:AddTextPart(": ", "@f")
:AddTextPart(Message)
:SetMessageType(mtCustom)
)
And the error is:
Code:
[17:49:46] LUA: Plugins\ChatFormatter/main.lua:15: error in function 'BroadcastChat'.
argument #1 is 'class cRoot'; 'cRoot' expected.
[17:49:46] Stack trace:
[17:49:46] [C](-1): BroadcastChat
[17:49:46] Plugins\ChatFormatter/main.lua(15): (no name)
[17:49:46] Stack trace end
[17:49:46] Error in <attached> calling function <callback>()
I hope you guys can solve my issue. Thanks!