View Single Post
Old 12-11-2022, 07:33 AM   #439
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,500
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
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.
I presume you want removedtags to be an empty list. Use
Code:
	else
		removedtags = ''
You could accompany it with this, which might be clearer and would be a bit faster in the case where removedtags is empty.
Code:
	if removedtags then
		list_union($#admin_tags, removedtags, ',')
	else
		$#admin_tags
	fi

Last edited by chaley; 12-11-2022 at 01:37 PM. Reason: Added missing code tags
chaley is offline   Reply With Quote