Solution: In addition to tripping myself up with orphaned parens trying to fix by assuming value resolution issues, the real issue for...
Log shows an error "Server Error: Unrecognized character \xC2 ".
... Is that there were hidden whitespaces in the code. It was suggested that this happened as a result of copying the function from help.
Original question follows...
I'm still relatively new to Sawtooth and definitely to Perl and first time poster. I am just not spotting what is wrong with the Syntax... I think the logic is good...
I've commented out the lines that cause an error (assuming syntax issue?). Log shows an error "Server Error: Unrecognized character \xC2 ".
FuncBenefit is a multi-select check box and that is the capitlization for it.
I am trying to test answers for items 1-8 and of those selections find the cell with most available items in a quota.
Begin Unverified Perl
#Does not like either line with if Nor QUOTACELLREMAINING
my $QuotaCount = 0;
my $QuotaReturn = 0;
for($i = 1; $i<=8; $i++)
if (VALUE(("FuncBenefit_" . $i) == 1)
#if ($QuotaCount < QUOTACELLREMAINING (("FuncBenefitQuota", $i))
$QuotaReturn = $i;
#$QuotaCount = QUOTACELLREMAINING (("FuncBenefitQuota", $i));
return "<input type='hidden' id='QuotaSel_A' name='QuotaSel_A' value=" . $QuotaReturn . ">";