View Single Post
Old 01-13-2022, 09:19 PM   #793
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: 11,223
Karma: 77935877
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: I'm trying to make a chain that automatically calculates the #percentread on paper books by taking an inputted current page number and calculating that against the pagecount.

I thought I could do this with chain variables, but I think I'm misunderstanding the documentation.

The first action is to set a chain variable called 'pagenum.' I left the template blank.

The second action is to then run this template:

Code:
program:
	totalpage = $#pagecount;
	pagenum = globals(pagenum);
	newpercent = round(multiply ((totalpage / pagenum), 100));
However, when I try this I get EXCEPTION: Interpreter: Error during operator evaluation: operator '/' - line number 4 and it won't let me save it.

Last edited by ownedbycats; 01-13-2022 at 09:23 PM.
ownedbycats is offline   Reply With Quote