View Full Version : Nested tables

September 25th, 2015, 10:06 AM

I have a problem and most likely it is because i do not use tables/nested tables correctly.

The following code works just fine,

_, _, NumberZones = string.find(varJRMC_Zones,"\"NumberZones\">(%d)")

but when I use the following,

_, _, JRMC.NumberZones = string.find(JRMC.varJRMC_Zones,"\"NumberZones\">(%d)")

I get an error stating the following,

17:00:27, Source=Script Action - PCall, Message=JRMC_TEST / [string "JRMC_TEST"]:12: attempt to index field 'varJRMC_Zones' (a nil value)
stack traceback:
[string "JRMC_TEST"]:12: in main chunk, Node=( {4e604e6a-9ae9-4e88-88e3-fc7baf93c4a3}, 9)

Any idea what I am doing wrong????

Thanks and have a nice weekend

September 26th, 2015, 02:38 PM
do a table.print(JRMC) to see what is actually in JRMC.

October 1st, 2015, 04:56 AM
Thanks for pointing me in another direction.
The JRMC table was empty at that point in the script.............
The actual problem was they way I was using network.get where the data came from.

Have a nice day