And yes, it would make more sense to count the authors.
Code:
program:
# return separator+authors if only one author, or return empty
various_authors=cmp(
count(field('authors'), '&'),
1,
'loud error -- I have no authors, huh?',
strcat(' - ', field('authors')),
''
);
end_template=template('{series_index:0>4s| | - }{title} - {authors}');
start_template=test(
field('series'),
strcat(
'_ ',
field('series'),
various_authors
),
field('authors')
);
strcat(start_template, '/', end_template);