![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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' |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 EDIT: My indenting went weird when I pasted it here. |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#5 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,797
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I see the semicolon now.
![]() |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
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 |