Script compiles but moving errors on run
Posted: Mon Jun 23, 2008 8:35 pm
I attach an extract from a very long script. The problem one can Apply or compile the script, but when ru, errors show up.
The error relates to the + operator initially but if the line is commented out, the error moves down. Sometimes it shows an error in a commented line.
If the offending script has the error lines commented out, eventually, the script runs.
There is nothing remarkable about the segment so I welcom comment.
--Main Formula section
-- ConstantSum
put L1 + L2 + L3 + L4 + L6 + L7 + L8 + L11 + L12 into ConstantSum
--answer ConstantSum
--Col A1
put ConstantSum + M3aUpperMat + M4aUpperMat + M5aUpperMat into UpperA1
put M3aUpperFract * M4aUpperFract * M5aUpperFract / UpperA1 into UpperA1
--answer UpperA1
--Col A3
put ConstantSum + M3aUpperBridge + M4aUpperMat + M5aUpperMat into UpperA3
put M3aUpperBrFract* M4aUpperFract * M5aUpperFract / UpperA3 into UpperA3
--answer UpperA3
--Col A5
--put ConstantSum+M3aUpperMat + M4aUpperBridge + M5aUpperMat into UpperA5
--put M3aUpperFract* M4aUpperBrFract * M5aUpperFract / UpperA5 into UpperA5
--answer UpperA5
--Col A7
--put ConstantSum + M3aUpperBridge + M4aUpperBridge + M5aUpperMat into UpperA7
---put M3aUpperBrFract* M4aUpperBrFract * M5aUpperFract / UpperA7 into UpperA7
--answer UpperA7
--Col A9
put ConstantSum + M3aUpperMat + M4aUpperMat + M5aUpperBridge into UpperA9
put M3aUpperFract* M4aUpperFract * M5aUpperBrFract / UpperA9 into UpperA9
--answer UpperA9
--Col A11
put ConstantSum + M3aUpperBridge + M4aUpperMat + M5aUpperBridge into UpperA11
put M3aUpperBrFract* M4aUpperFract * M5aUpperBrFract / UpperA11 into UpperA11
--answer UpperA11
--Col A13
--put ConstantSum + M3aUpperMat + M4aUpperBridge + M5aUpperBridge into UpperA13
--put M3aUpperFract* M4aUpperBrFract* M5aUpperBrFract / UpperA13 into UpperA13
--answer UpperA13
--Col A15
--put ConstantSum + M3aUpperBridge + M4aUpperBridge + M5aUpperBridge into UpperA15
---put M3aUpperBrFract* M4aUpperBrFract* M5aUpperBrFract / UpperA15 into UpperA15
--answer UpperA15
--Sum and 1/x of upper
---put 1/(UpperA1 + UpperA3 + UpperA5 + UpperA7 + UpperA9 + UpperA11 + UpperA13 + UpperA15) into SumUpper
--answer SumUpper
-- lower
put ConstantSum +M3aResult + M4aResult + M5aResult into A17
--answer A17
--Total Resistance of wall
---put 1/((SumUpper+ A17)/2) into TotalResistance
--answer TotalResistance
--Correction for air gaps and wall ties
put 0.0032 into WallTies
--Assume Level 1 of 0.01 and 0.0032 for wall ties
--put 0.01*((L7 / ((SumUpper+ A17)/2) * ((SumUpper+ A17)/2))) into AirGap
--answer AirGap
--put TotalResistance + AirGap + WallTies into Ucalculated
--answer Ucalculated
--put round (Ucalculated,2) into Uvalue
--answer Uvalue
----Now test to see if it meets filter
--put the label of button "SelectUvalue" into RequiredUvalue
put empty into Total
--if RequiredUvalue = Uvalue then put 1 + total into total--If the test with this combination is true then put it into the main list for later selection
-- End of calculation section
I have isolated the card from the stack if anyone wants to see the whole process.
The error relates to the + operator initially but if the line is commented out, the error moves down. Sometimes it shows an error in a commented line.
If the offending script has the error lines commented out, eventually, the script runs.
There is nothing remarkable about the segment so I welcom comment.
--Main Formula section
-- ConstantSum
put L1 + L2 + L3 + L4 + L6 + L7 + L8 + L11 + L12 into ConstantSum
--answer ConstantSum
--Col A1
put ConstantSum + M3aUpperMat + M4aUpperMat + M5aUpperMat into UpperA1
put M3aUpperFract * M4aUpperFract * M5aUpperFract / UpperA1 into UpperA1
--answer UpperA1
--Col A3
put ConstantSum + M3aUpperBridge + M4aUpperMat + M5aUpperMat into UpperA3
put M3aUpperBrFract* M4aUpperFract * M5aUpperFract / UpperA3 into UpperA3
--answer UpperA3
--Col A5
--put ConstantSum+M3aUpperMat + M4aUpperBridge + M5aUpperMat into UpperA5
--put M3aUpperFract* M4aUpperBrFract * M5aUpperFract / UpperA5 into UpperA5
--answer UpperA5
--Col A7
--put ConstantSum + M3aUpperBridge + M4aUpperBridge + M5aUpperMat into UpperA7
---put M3aUpperBrFract* M4aUpperBrFract * M5aUpperFract / UpperA7 into UpperA7
--answer UpperA7
--Col A9
put ConstantSum + M3aUpperMat + M4aUpperMat + M5aUpperBridge into UpperA9
put M3aUpperFract* M4aUpperFract * M5aUpperBrFract / UpperA9 into UpperA9
--answer UpperA9
--Col A11
put ConstantSum + M3aUpperBridge + M4aUpperMat + M5aUpperBridge into UpperA11
put M3aUpperBrFract* M4aUpperFract * M5aUpperBrFract / UpperA11 into UpperA11
--answer UpperA11
--Col A13
--put ConstantSum + M3aUpperMat + M4aUpperBridge + M5aUpperBridge into UpperA13
--put M3aUpperFract* M4aUpperBrFract* M5aUpperBrFract / UpperA13 into UpperA13
--answer UpperA13
--Col A15
--put ConstantSum + M3aUpperBridge + M4aUpperBridge + M5aUpperBridge into UpperA15
---put M3aUpperBrFract* M4aUpperBrFract* M5aUpperBrFract / UpperA15 into UpperA15
--answer UpperA15
--Sum and 1/x of upper
---put 1/(UpperA1 + UpperA3 + UpperA5 + UpperA7 + UpperA9 + UpperA11 + UpperA13 + UpperA15) into SumUpper
--answer SumUpper
-- lower
put ConstantSum +M3aResult + M4aResult + M5aResult into A17
--answer A17
--Total Resistance of wall
---put 1/((SumUpper+ A17)/2) into TotalResistance
--answer TotalResistance
--Correction for air gaps and wall ties
put 0.0032 into WallTies
--Assume Level 1 of 0.01 and 0.0032 for wall ties
--put 0.01*((L7 / ((SumUpper+ A17)/2) * ((SumUpper+ A17)/2))) into AirGap
--answer AirGap
--put TotalResistance + AirGap + WallTies into Ucalculated
--answer Ucalculated
--put round (Ucalculated,2) into Uvalue
--answer Uvalue
----Now test to see if it meets filter
--put the label of button "SelectUvalue" into RequiredUvalue
put empty into Total
--if RequiredUvalue = Uvalue then put 1 + total into total--If the test with this combination is true then put it into the main list for later selection
-- End of calculation section
I have isolated the card from the stack if anyone wants to see the whole process.