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
GopherLua is a Lua5.1 implementation. You should be familiar with Lua programming language. Have you read Lua 5.1 reference manual carefully?
GopherLua is a Lua5.1 implementation. In Lua, to keep it simple, it is more important to remove functionalities rather than to add functionalities unlike other languages . If you are going to introduce some new cool functionalities into the GopherLua code base and the functionalities can be implemented by existing APIs, It should be implemented as a library.
Please answer the following before submitting your issue:
What version of GopherLua are you using? :
Latest
What version of Go are you using? :
Latest
What operating system and processor architecture are you using? :
OSX
HI.
I'm trying to pass in a lua table to a CallByParam like this:
// Call will call a Lua method in a loaded plugin.funcCall(functionstring, args lua.LTable) (lua.LValue, error) {
iferr:=L.CallByParam(lua.P{
Fn: L.GetGlobal(function),
NRet: 1,
Protect: true,
}, args); err!=nil {
panic(err)
}
ret:=L.Get(-1) // returned valueL.Pop(1) // remove received valuereturnret, nil
}
So, obviously this isn't permitted since lua.P requires a lua.LValue. So I looked at userType because maybe that could help, but I'm still confused on how to do this the right way. I wonder if I'm missing something? Is there a way to nicely convert table to something usable instead?
The point of the table is that I have arbitrary parameters I don't want to parse rather pass in as a table so the corresponding lua script can deal with handling the data however it wants.
I saw something like map -> json -> table somewhere in the old issues, but I didn't see an example on that comment.
Thanks!
The text was updated successfully, but these errors were encountered:
Please answer the following before submitting your issue:
Latest
Latest
OSX
HI.
I'm trying to pass in a lua table to a CallByParam like this:
So, obviously this isn't permitted since lua.P requires a lua.LValue. So I looked at userType because maybe that could help, but I'm still confused on how to do this the right way. I wonder if I'm missing something? Is there a way to nicely convert table to something usable instead?
The point of the table is that I have arbitrary parameters I don't want to parse rather pass in as a table so the corresponding lua script can deal with handling the data however it wants.
I saw something like map -> json -> table somewhere in the old issues, but I didn't see an example on that comment.
Thanks!
The text was updated successfully, but these errors were encountered: