Hey guys, I was wondering if Lua or Roblox supports the idea of having multiple functions with the same name but different parameters.
Example:
function add(one, two)
--Code
end
function add(one, two, three)
--Code
end
Using the above example, would I be able to call one of the functions depending on the amount of parameters I pass?
Lets say I call add(1, 1) would that then call the first function properly?
Same thing goes for add(1, 1, 2)?
If there is a link to this, let me know. I was looking but I could not find it.

3 comments
Ah, yes. I get my terms mixed up a lot. I will fix the title. Thanks for the answer, too.
The reason Lua doesn't allow type-based overloading is Lua variables do not have types. You can use Tables to sort functions with the same names but different numbers or types of parameters, though.
huh, that "pseudo overloading" bit was interesting.