I am once again flummoxed.
I am trying to find and correct errors in my gravesites.
I find them and have them in GEDRCD
I then strip out the memmorial id from gravminer, digitalarkkivet or findagrave.
now I want to look for duplicates:
for k, _ in ipairs(GEDRCD) do
this = GEDRCD[k]
_dup[this.MML] = _dup[this.MML] or {rrn = {}}
_dup[this.MML].rrn[#rrn + 1] = this <<<< statement in error
end
error: attempt to get length of global 'rrn' (a nil value)
_dup[123456789]. rrn= { } at the error
I am improving somewhat, because I recognize I have had this error before and MikeTate helped me thru it:
--[[
object = famOBJ[#famOBJ].CHIL
local instance = #famOBJ[#famOBJ].CHIL
object[instance + 1] = c_iID
]]
famOBJ[#famOBJ].CHIL[#famOBJ[#famOBJ].CHIL + 1] = c_iID
_dup[this.MML].rrn(*miracle occurs here*) [#rrn + 1] = this
I intend to make an array of every record number of my gedcom array (this) in rrn array
if there is only one record in the array when done processing I get rid of it. this will result in an empty _dup or a _dup with multiple records... viola, duplicates.
I have tried a multitude of combinations and brackets but not really understanding it, having walked thru it in my mind and not connected with it a billion times..... I am still at a loss
* addressing an interior array
addressing an interior array
FH V.6.2.7 Win 10 64 bit
- tatewise
- Megastar
- Posts: 28953
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: addressing an interior array
Try:
_dup[this.MML].rrn[#_dup[this.MML].rrn+1] = this
_dup[this.MML].rrn[#_dup[this.MML].rrn+1] = this
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry