Page 1 of 1

Custom Lua with optional var

Posted: Thu Jan 26, 2017 12:45 pm
by VernTheVanquisher
i've registered my own lua call but like some of yours i want it to have optional parameters. i've tried just writing my method with optional parameters but if i don't use all the parameters the lua doesn't sync with my method. i would create multiple overloads but i read we shouldn't have multiple registered functions with the same name? any help would be appreciated. thanks in advance.

Re: Custom Lua with optional var

Posted: Thu Jan 26, 2017 1:25 pm
by Tony Li
Sorry, C# functions registered with Lua don't support overloads or optional parameters. You'll have to register them as different function names.

Re: Custom Lua with optional var

Posted: Fri Jan 27, 2017 11:46 am
by VernTheVanquisher
good to know. thanks