Hey, I'm trying to add a custom event but getting "Object reference not set to an instance of an object" error instead.
Exception details:
[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()
{
Events.Add("sendhelloworld", SendHelloWorld);
}
private void SendHelloWorld(object[] args)
{
NAPI.Util.ConsoleOutput("Hello world.");
}
[Command("hey")]
public void TriggerHelloWorld(Player sender)
{
Events.CallLocal("sendhelloworld", sender);
}