You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the colon syntax (eg myTable:Function()) works properly when a function is declared directly in Lua. However, when adding a function to a table via C#, the would be 'self' parameter seems to get dropped.
Unsure if it's related, but I'm using Moonsharp in Unity.
I noticed it on the version I was on (0.9.8.0), but tried using 1.6.0.0 and got the same results too.
The above will generate something along the lines of:
(30,14-26): cannot convert a string to a clr type MoonSharp.Interpreter.Table
Changing the C# function declaration to take a DynValue as the first parameter causes my string to end up in that value, and the later string to be null.
Declaring it all in Lua, (like as follows), works fine:
otherTable = {}
function otherTable:Bar(s)
print("My table: " .. self)
print(s)
end
otherTable:Bar("This prints!")
The text was updated successfully, but these errors were encountered:
Using the colon syntax (eg
myTable:Function()
) works properly when a function is declared directly in Lua. However, when adding a function to a table via C#, the would be 'self' parameter seems to get dropped.Unsure if it's related, but I'm using Moonsharp in Unity.
I noticed it on the version I was on (0.9.8.0), but tried using 1.6.0.0 and got the same results too.
The above will generate something along the lines of:
Changing the C# function declaration to take a DynValue as the first parameter causes my string to end up in that value, and the later string to be null.
Declaring it all in Lua, (like as follows), works fine:
The text was updated successfully, but these errors were encountered: