View Single Post
Old 12-31-2022, 07:45 AM   #17
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,460
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ackomb View Post
Hey @chaley I have another question for you.

I follow multiple shows where one of the main characters will have the same of a similar name that is shortened to the same tag on AO3. For example "Lex" being used as a short for Alexandra, Alex, Alexander, Lexa etc. combine this that some shows are crossing over into others it makes for a mess with the tags, so I want to clean this up by building in another if statement that the show needs to contain both show A and Show B. So far I got as far as this:

Code:
program:
output = '';

	for item in $#pair:
		if $#show == "show A, Show B" then
			if item ==  "ABC/XYZ" then ni = "AAA / BBB"
			elif item ==  "DEF/UVW" then ni = "CCC / DDD"
		else ni = item
		fi;
		output = output & ',' & ni
	rof;
	output = list_sort(list_remove_duplicates(output, ','), 0, ',')
But the I get the following Error message:
EXCEPTION: Formatter: if statement: expected 'fi', found 'rof' near Unknown on line 13

So I understand there needs to be another 'fi' as to end the if statement, but I've tried adding it in number of places but it just does not change the fact I keep getting errors. I was hoping you could give me a hint in the right direction.
Assuming your indenting is correct then the missing 'fi' is needed to close the if/elif that begins on line 6.
Code:
program:
output = '';

	for item in $#pair:
		if $#show == "show A, Show B" then
			if item ==  "ABC/XYZ" then ni = "AAA / BBB"
			elif item ==  "DEF/UVW" then ni = "CCC / DDD"
			fi
		else ni = item
		fi;
		output = output & ',' & ni
	rof;
	output = list_sort(list_remove_duplicates(output, ','), 0, ',')
chaley is offline   Reply With Quote