Getting Highlighted Reference Points
Posted: Thu Mar 19, 2020 7:07 pm
The code below works as far as getting the number of Reference points and whether they are highlighted. It fails on the logic test of whether zz='Yes'. What am I missing?
--Get all Highlighted Reference Points
local u = VP_GetSide({Side ='Vietnam'}) -- a side object
--print(u.rps)
tbl={}
tbl=u.rps
--print(tbl)
local count = 0
for _ in pairs(tbl) do
count = count + 1
end
print(count)
for i=1, count do
if u.rps~=nil then
local zz=u.rps.highlighted
print(zz)
if zz=='Yes' then
print(u.rps) -- ***This is not getting printed***
end
end
end
--Get all Highlighted Reference Points
local u = VP_GetSide({Side ='Vietnam'}) -- a side object
--print(u.rps)
tbl={}
tbl=u.rps
--print(tbl)
local count = 0
for _ in pairs(tbl) do
count = count + 1
end
print(count)
for i=1, count do
if u.rps~=nil then
local zz=u.rps.highlighted
print(zz)
if zz=='Yes' then
print(u.rps) -- ***This is not getting printed***
end
end
end