View Single Post
04/13/14, 04:23 AM   #10
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by Seerah View Post
I already explained the logic. What you quoted was not the logic.
I guess there was no logic to quote.


Already "it's a return from the event handler" does not make sense.

LUA functions can only return a value and a function as value has no signature.

That's why there are no overloaded functions in LUA and you can't differentiate between myfunc(int) and myfunc(string), unless you write your own dispatcher, which adds the type of the parameter to the function name and implements myfunc(whatever) like if type(whatever) == "string" then return myfunc.string(whatever) end.
  Reply With Quote