function test42(numb)
{
var mystr, mynewstring, mynewnumber;
mystr = aqConvert.VarToStr(numb);
if (aqString.SubString(mystr,0,1) == 1 || aqString.SubString(mystr,0,1) == 2)
{
mynewsting = aqString.SubString(mystr,0,3) + "0";
Log.Message(mynewsting)
mynewnumber = aqConvert.VarToStr(mynewstring);
Log.Message(mynewnumber)
}
else if (aqString.SubString(mystr, 0, 1) >= 3 || aqString.SubString(mystr,0,1) <= 7)
{
mynewsting = aqString.SubString(mystr,0,3) + "5";
Log.Message(mynewsting)
mynewnumber = aqConvert.VarToStr(mynewstring);
Log.Message(mynewnumber)
}
else if (aqString.SubString(mystr, 0, 1) == 8 || aqString.SubString(mystr,0,1) == 9)
{
mynewnumber = Math.round(numb)
Log.Message(mynewnumber)
}
}
the brackets have been corrected. The error was still in the wrong syntax so I put == instead of =. Then it passes but everything is rounded with 5 at the end