Getting a “Missing trailer” error in code and not sure what it means? Snippet below:
//this code is part of a function with users as the function params
var userobjects:collection = [user2,user3,user4,user5,user6]
var usernum:number
for(usernum,0,4)
if(userobjects[usernum].legalname == “” && userobjects[usernum].owner.legalname == “” && userobjects[usernum].signerbool == false &&
userobjects[usernum].accessbool == false)
continue
end
if(userobjects[usernum].legalname != “” && userobjects[usernum].owner.legalname != “”)
if(userobjects[usernum].signerbool == true || userobjects[usernum].access == true)
if(userobjects[usernum].signerbool == true)
signercount += 1
end
continue
end
end
userErrObj.errMsg = "Incomplete entry for user " + (usernum + 2)
userErrObj.errBool = true
return userErrObj
end
Looks like it had to do with this line:
if(userobjects[usernum].legalname == “” && userobjects[usernum].owner.legalname == “” && userobjects[usernum].signerbool == false &&
userobjects[usernum].accessbool == false)
I don’t think it liked the if statement spanning multiple lines with the "" so i put it one one long line and it worked.
This issue has been identified as a bug related to the use of the line continuation (\) in the if condition inside the for loop, and it has been reported.
In the meantime, as a temporary workaround, please avoid splitting the if condition across multiple lines with \ when it is inside a for loop, and instead write it entirely on a single line. This will prevent the missing trailer error from appearing.