* *SOLVED* I dont understand the error

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
Ron Melby
Megastar
Posts: 878
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

*SOLVED* I dont understand the error

Post by Ron Melby » 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.
FH V.6.2.7 Win 10 64 bit

Post Reply