*SOLVED* I dont understand the error
Posted: 23 Feb 2020 16:43
attempt to compare two table values <<this is the error, all of it.
what occurs is in two cases on my source for FindaGrave, it is either malformed or it is duplicate.
if it is duplicate, I take the numeric portion of the key and put it in my record, in DUPMML
if it is malformed, I put '*Error' in DUPMML
otherwise DUPMML = ''
I have debugged it, and DUPMML is being entered correctly.
if ptrLink:IsNotNull() then
--[[ www.findagrave.com/memorial/1234567890 ]]
ptrWEB:MoveTo(ptrSRC,'~.PAGE')
WebPage = fhGetValueAsText(ptrWEB)
DUPMML = ''
MML = trim(WebPage:gsub('.-(%d+).*','%1'))
--[[ if malformed or no FagLink ]]
if MML == '' then
MML = '*Error'
DUPMML = '*Error'
errFaG = true
else
out = prcMML(MML)
if out then
errFaG = true
for _, rrn in ipairs(out) do
GEDRCD[rrn].DUPMML = movl(MML)
DUPMML = GEDRCD[rrn].DUPMML
end
end
end
-
in either case I set an error flag then I throw up a window, do you want to see errors
if they say yes I sort the field descending
I
if errFaG == true then
rc, dupFaG = sltDUPDSP()
if rc == WS_CANCEL then
return
end
if dupFaG == true then
table.sort(GEDRCD, ERRFaG)
matERR()
return
end
end
**Sort**
function ERR_FaG(a, b)
return a.DUPMML > b.DUPMML
end
what does it mean? the sort fails with that error.
I now understand the error. mistyped... obscure error statement.
what occurs is in two cases on my source for FindaGrave, it is either malformed or it is duplicate.
if it is duplicate, I take the numeric portion of the key and put it in my record, in DUPMML
if it is malformed, I put '*Error' in DUPMML
otherwise DUPMML = ''
I have debugged it, and DUPMML is being entered correctly.
if ptrLink:IsNotNull() then
--[[ www.findagrave.com/memorial/1234567890 ]]
ptrWEB:MoveTo(ptrSRC,'~.PAGE')
WebPage = fhGetValueAsText(ptrWEB)
DUPMML = ''
MML = trim(WebPage:gsub('.-(%d+).*','%1'))
--[[ if malformed or no FagLink ]]
if MML == '' then
MML = '*Error'
DUPMML = '*Error'
errFaG = true
else
out = prcMML(MML)
if out then
errFaG = true
for _, rrn in ipairs(out) do
GEDRCD[rrn].DUPMML = movl(MML)
DUPMML = GEDRCD[rrn].DUPMML
end
end
end
-
in either case I set an error flag then I throw up a window, do you want to see errors
if they say yes I sort the field descending
I
if errFaG == true then
rc, dupFaG = sltDUPDSP()
if rc == WS_CANCEL then
return
end
if dupFaG == true then
table.sort(GEDRCD, ERRFaG)
matERR()
return
end
end
**Sort**
function ERR_FaG(a, b)
return a.DUPMML > b.DUPMML
end
what does it mean? the sort fails with that error.
I now understand the error. mistyped... obscure error statement.