neolithos / neolua

A Lua implementation for the Dynamic Language Runtime (DLR).
https://neolua.codeplex.com/
Apache License 2.0
466 stars 76 forks source link

How to assign a value to a custom Struct? #162

Open sunmerx opened 1 year ago

sunmerx commented 1 year ago

NeoLua Version:1.3.14

Example to reproduce:

item = plcns.WriteDataItem(){
    DataArea = plcns.DataAreaType.DB;
    DBNumber=660;
    StartAddress=100;
    ValueType=plcns.DataType.INT;
};

I'm trying to embed a script into a program so that the logic depends on the script. Initialize a custom body in a script and cannot assign values to its members.

neolithos commented 1 year ago

Can you show the signature of plcns and WriteDataItem?