Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-10-2021, 07:23 PM   #1
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,797
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Template: Missing 'fi'

There's a missing/misplaced 'fi' somewhere in this statement. Where should it go?

Code:
program:
k = field('#kobocoll');
if check_yes_no('#onkobo', 0, 1, 0) then 
    'sync.png' 
else
    if check_yes_no('#onkobo', 0, 0, 1) then
        	if list_contains(k, ',', '^Kobo Store$', '1', '') then 
            'drm-locked.png'
        	if list_contains(k, ',', '^Send to Device$', '1', '') then 
            'sync.png'			
        else
            'reader.png'
        fi
    fi
fi

Last edited by ownedbycats; 03-10-2021 at 07:59 PM.
ownedbycats is offline   Reply With Quote
Old 03-10-2021, 08:16 PM   #2
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
When I put that in the template editor, I got the error:

Code:
EXCEPTION:  Formatter: Missing 'fi' in if statement near 'drm-locked.png'
You need "fi;" after that line. Adding that gets rid of that error, but, I get one about missing columns so can't test it easily.
davidfor is offline   Reply With Quote
Advert
Old 03-10-2021, 08:19 PM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,797
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Code:
program:
k = field('#kobocoll');
if check_yes_no('#onkobo', 0, 1, 0) then 
    'sync.png' 
else
    if check_yes_no('#onkobo', 0, 0, 1) then
        	if list_contains(k, ',', '^Kobo Store$', '1', '') then 
            'drm-locked.png'
				fi
        	if list_contains(k, ',', '^Send to Device$', '1', '') then 
            'sync.png'			
        else
            'reader.png'
        fi
    fi
fi
EXCEPTION: Formatter: Missing 'fi' in if statement near 'fi' now. Hmm

EDIT: My indenting went weird when I pasted it here.
ownedbycats is offline   Reply With Quote
Old 03-10-2021, 10:15 PM   #4
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
Read my post. You need exactly what I put in the quotes. You are missing the semi-colon.
davidfor is offline   Reply With Quote
Old 03-10-2021, 10:55 PM   #5
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,797
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I see the semicolon now.
ownedbycats is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Normal" template inside GPM template ownedbycats Library Management 20 12-02-2020 09:40 PM
Using built-in template functions in a custom template function ilovejedd Library Management 4 01-28-2018 12:20 PM
Help with template... or something else Glottis Library Management 5 10-07-2015 12:55 PM
Calibre Metadata From Amazon Missing. What Am I Missing? BruticusBob Library Management 4 07-23-2013 08:43 PM
Missing covers, missing content. Getting worse with each sync. Mememememe Kobo Reader 7 06-16-2010 09:02 AM


All times are GMT -4. The time now is 01:39 AM.


MobileRead.com is a privately owned, operated and funded community.