diff --git a/AIO_Client/AIO.lua b/AIO_Client/AIO.lua index 05cc6f2..2e9a651 100644 --- a/AIO_Client/AIO.lua +++ b/AIO_Client/AIO.lua @@ -784,7 +784,7 @@ end -- All parameters the client sends will be passed to func when called -- Only one function can be a handler for one name (subject for change) function AIO.RegisterEvent(name, func) - assert(type(name) == "string", "name of the registered event string expected") + assert(name ~= nil, "name of the registered event expected not nil") assert(type(func) == "function", "callback function must be a function") assert(not AIO_BLOCKHANDLES[name], "an event is already registered for the name: "..name) AIO_BLOCKHANDLES[name] = func diff --git a/AIO_Server/AIO.lua b/AIO_Server/AIO.lua index 05cc6f2..2e9a651 100644 --- a/AIO_Server/AIO.lua +++ b/AIO_Server/AIO.lua @@ -784,7 +784,7 @@ end -- All parameters the client sends will be passed to func when called -- Only one function can be a handler for one name (subject for change) function AIO.RegisterEvent(name, func) - assert(type(name) == "string", "name of the registered event string expected") + assert(name ~= nil, "name of the registered event expected not nil") assert(type(func) == "function", "callback function must be a function") assert(not AIO_BLOCKHANDLES[name], "an event is already registered for the name: "..name) AIO_BLOCKHANDLES[name] = func