From 2b734d9b07e500fd08da480d9f84632116929a64 Mon Sep 17 00:00:00 2001 From: Saif Date: Sun, 23 Aug 2015 18:18:06 +0500 Subject: [PATCH] Changed AIO.RegisterEvent assertion --- AIO_Client/AIO.lua | 2 +- AIO_Server/AIO.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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