Thanks for explaining that table concept....butKeith Baxter wrote: ↑Mon Sep 05, 2022 9:58 pm Hi
Lua is not that complex when you start to understand.
Lets do a simple table. my_table = {"Jack", "Fred", Jane"}
If this was a .json, then after the static_data_load(), my_table would = {"Jack", "Fred", Jane"}
Now lets change the value of the 2nd index "Fred" to "Tom"
my_table = {"Jack", "Tom", Jane"}
If we call ....print(my_table[2]) we would receive a print value of Tom.
This would not change the value in the .json. Only the value in the loaded table my_table()
Keith
1. Is "my_table" a user defined variable or is that a lua function?
2. What is "the static_data_load()," ?
3. The "print(my_table[2])" returns the second item in the list of those three names?
4. You edit the original .json file and change the 2nd index of Fred to Tom.
5. What is the "loaded table" and where is it loaded?
6. Are you saying that the table, wherever it is loaded, is no longer the same as the original .json?
Not ever having programmed before, I have lots of questions about those terms you use. This is where an in person tutor available to answer and explain some of the basics would be very helpful.
Sometimes it takes asking the questions in different ways to get to an understanding of the concepts. And trying to do that with printed communication rather than direct talking can take lots of time.
Human communication is such an inexact science...
I've been trying to find some local programming tutors that I can meet with here in my town, but not having any luck so far.