Hey, I am trying to create a sub_table and pass the parent_table as argument to a server event. But inside the event function any access to sub_table returns nil, parent_table works fine though.
What is the proper way do this in LUA?
Client side:
local parent_table = {}
local sub_table = {}
sub_table["element1"] = 'One'
sub_table["element2"] = 'Two'
parent_table["number"] = sub_table
TriggerServerEvent('usefull:event', parent_table)
I was thinking that since LUA will pass things as reference, the reference to sub_table is left behind at the client side. Anyway, supose I should just create one shallow huge table and move on.