In the manual you can read:
Up to now, at the beginning of my script I had following table declaration:You can access named elements of a table also in two ways:
b = a["name"]
b = a.name
Code: Select all
mapSettings = {
["minRmW"] = 3,
["minRmH"] = 3,
["maxRms"] = 5,
["rmChnc"] = 80,
["sparse"] = 50,
["loops"] = 50,
["rndDirTreshold"] = 80
}
Code: Select all
mapSettings = {
minRmW = 3,
minRmH = 3,
maxRms = 5,
rmChnc = 80,
sparse = 50,
loops = 50,
rndDirTreshold = 80
}
And now I had a lot of errors: "table field was not initialized" and it turned out that my old syntax was causing it:
Code: Select all
aLoc=bspSplit(0,0,#W,#H,mapSettings["maxRms"])
Code: Select all
colorReq.shadowOnOff=color["shadowOnOff"]
Code: Select all
mapSettings.maxRms
color.shadowOnOff
Have I misunderstood something here?