I work on a C# based GUI interfacing with a Lua engine. I searched
for help but I am not getting a correct solution and I cannot change
much on the Lua side because the LuaInterface.dll is given to me and
cannot be changed.
In C#, I have a function as below:
public Int32 Calculate_Func(string input,out Byte[] byte_arr)
{
byte_arr = Process(input);
return 1;
}
In Lua, I call the above function as:
ret, val = Calculate_Func(Packet_String)
But I see that the byte array is not getting reflected in my Lua function. When I try reading the value of the val
variable, it returns System.Byte[]
. I am unable to access the byte array values in Lua.
But If I change the byte array to string, the value gets returned,
but I need the bytes to be processed in Lua. How can I achieve this?