Can't figure out how to add data to a database though a Lua script on Cloud Gem DynamoDB initial content

I’m currently working on making a cloud gem that uses DyanamoDB. I am stuck on how to post data through a Lua script. I keep getting issues along the lines of:
"[Error] (Script) - Lua failed to call method: cannot convert parameter 1 from table to ExampleData*"
"[Error] (Script) - Lua failed to call method: cannot convert parameter 2 from table to const ExampleData&".

I have tried different ways, and the latest was:

CloudGemInventory_ExampleData.ExamplePropertyA = UiTextInputBus.Event.GetText(self.dataToStore)
CloudGemInventory_ExampleData.ExamplePropertyB = 0	

I am just unsure what to put in CreateExampleData as it requires a specific data type that I don’t know how to provide.

Just me being a noob with Lua. I didn’t realise I can create the example data class using a constructor as you can in other languages.

1 Like