View Single Post
Old 12-10-2022, 11:57 PM   #438
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,166
Karma: 77304081
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I made this template to check for the value of Story Does Not Exist. in one column. If it's present, then generate a new value (based on the publisher) and use list_union to merge it into #admin_tags.
Code:
program:

	if 
		$#fanficerror == "Story Does Not Exist." 
	&& 
		$publisher == 'Archive Of Our Own'
	then
		removedtags = list_item('removedfromsite:ao3',0,',') 

	elif
		$#fanficerror == "Story Does Not Exist." 
	&& 
		$publisher == 'FanFiction.net'
	then
		removedtags = list_item('removedfromsite:ffnet',0,',') 			
	fi;

	list_union($#admin_tags, removedtags, ',')
Running this on a book that doesn't match the checks (e.g. empty $#fanficerror) makes this error:

Code:
EXCEPTION: Interpreter: Unknown identifier 'removedtags' - line number 18
The last time it happened, I was able to use a second if-then check but since there's two of them here I don't think it'll work. Any other suggestions?

EDIT: Perhaps an "else removedtags = {something}" to set it for the non-matches? But I'm not sure what to put for the something.

Last edited by ownedbycats; 12-11-2022 at 12:35 AM.
ownedbycats is offline   Reply With Quote