View Single Post
Old 12-25-2020, 09:16 PM   #7
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
The result of "str_in_list" isn't returning something that is being interpreted as a Boolean. The following works:

Code:
program:
if check_yes_no('#onkobo', 0, 1, 0) then 
    'sync.png' 
else
    if check_yes_no('#onkobo', 0, 0, 1) then
        if str_in_list(field('#kobocoll'), ',', "Kobo Store", 1, 0) == 1 then 
            'drm-locked.png'
        else
            'reader.png'
        fi
    fi
fi
But, that "if" isn't needed:
Code:
program:
if check_yes_no('#onkobo', 0, 1, 0) then 
    'sync.png' 
else
    if check_yes_no('#onkobo', 0, 0, 1) then
        str_in_list(field('#kobocoll'), ',', "Kobo Store", 'drm-locked.png', 'reader.png')
    fi
fi
davidfor is offline   Reply With Quote