Skip to content

Commit

Permalink
Changed AIO.RegisterEvent assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
SaiFi0102 committed Aug 23, 2015
1 parent c7bf8ef commit 2b734d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AIO_Client/AIO.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion AIO_Server/AIO.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b734d9

Please sign in to comment.