View Single Post
Old 03-31-2021, 04:11 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: 11,012
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I had to move ids = $identifiers; to the first line to prevent an error, but now I'm getting odd results.

e.g.

Status: In-Progress
Publisher: Archive of Our Own
identifiers: url, ao3
Intended result: null
Actual result: metadata.png

I am getting the same thing for FanFiction.net/ffnet.

modifying my original code like this does get the intended results though:

Code:
program:
	status = $#fanficstatus;
	publisher = $publisher;
	ids = $identifiers;
	u = select(ids, 'url');
 	a = select(ids, 'ao3');
	f = select(ids, 'ffnet');

	if 
		(a || f)
		&& u
		&& '(Archive of Our Own|Fanfiction.net)' in publisher  
		&& '(Completed|Abandoned|Oneshot)' in status
	then "metadata.png:"

	elif
		!a
		&& u
		&& publisher = 'Archive of Our Own'
		&& status = 'In-Progress'
	then "metadata.png:"

	elif
		!f
		&& u
		&& publisher = 'FanFiction.net'
		&& status = 'In-Progress'
	then "metadata.png:"

	fi

Last edited by ownedbycats; 03-31-2021 at 04:21 PM.
ownedbycats is offline   Reply With Quote