Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Error #132 – Scoring a survey

I'm trying to score a survey inside a larger survey. When I'm using the code below, I get Sawtooth Error #132. This code is in the footer of the final question in the survey.

Q1 is "How would you describe your pain? and the answer options are None, Very Mild, Mild, Moderate, Severe. None should have a score of 1, Very Mild a score of 2, and upwards until Severe has a score of 5.

[%Begin Unverified Perl
 if (VALUE("Q1")==1)
elsif (VALUE("Q1")==2)
  elsif (VALUE("Q1"))==3)
elsif (VALUE("Q1"))==4)
elsif (VALUE("Q1"))==5)
(this would repeat here with the Question 2 values as above)
End Unverified%]
asked Apr 19, 2017 by carohut (245 points)

1 Answer

+1 vote
You have a mismatched paren on lines 11, 15, and 19.  You have two close parens where you need only one.
answered Apr 19, 2017 by Zachary Platinum Sawtooth Software, Inc. (212,650 points)
Thanks. I'm having the same problem I had earlier now though. I'll mark "Very Mild" on the questionnaire, but the Q1 score will show up as 0 instead of 2. Thoughts?
Can you email a .ssi exemplifying the problem to zachary@sawtoothsoftware.com?