Perl from study in LS 9.7 not working in 9.12.1

I have a study on the server generated in LS 9.7 (from 2019) that runs fine.

I just opened the LS study file and converted it to 9.12.1
When I Test the study locally I get Sawtooth Error # 132 error message when I move on from a question.

That question has in the footer the code below (which I presume is the problem). Anyone able to spot the problem?

ab1 is a Constant Sum question on previous page.
x, y, oth1, pot1, pay1 are numeric pass-in fields.


thanks
Dan


 
[%SetValue(x,Value(ab1_1))%]
[%SetValue(y,Value(ab1_2))%]
[%SetValue(oth1,300)%]

[% Begin Unverified Perl

my $a= GETVALUE("ab1_1");
my $b= GETVALUE("ab1_2");
my $c= $a/100;
my $roundc = sprintf("%.2f", $c);
{
SETVALUE("fi1", $roundc);
}


my $j= GETVALUE("oth1");
my $h= 0.5;
my $fundpay1= ($b+$j)*0.5;
my $allpay1= $a+($b+$j)*0.5;
{
SETVALUE("pot1", $fundpay1);
SETVALUE("pay1", $allpay1);
}
End Unverified %]

Resolved
2 replies