Error in range start expression
Posted: Tue Jan 05, 2016 11:56 pm
I ask a lot of questions. I hope no one minds - I'm very stupid and very persistent.
I've got this little clause in my code - it's pulling information from a MySQL database and puts it into tName and tMessage for this part, and I'm trying to get it so it posts item 1 of tName, then item 1 of tMessage, then item 2 of tName, and item 2 of tMessage, and so on until it runs out:
else
set itemDelimiter to return
put 1 into tMessageCount
repeat for each item theNames in tName
put "<" && item theNames of tName && ">" after field "textDisplay"
put item tMessageCount of tMessage after field "textDisplay"
add 1 to tMessageCount
end repeat
However I get an error for the illustrated line in "range start expression". The variables all seem to be what they should be at this point. I looked at other people's solutions across the internet and tried "repeat with i = 1 to the number of lines of tName" instead but it didn't change anything. Still got the same error in the same place.
I've got this little clause in my code - it's pulling information from a MySQL database and puts it into tName and tMessage for this part, and I'm trying to get it so it posts item 1 of tName, then item 1 of tMessage, then item 2 of tName, and item 2 of tMessage, and so on until it runs out:
else
set itemDelimiter to return
put 1 into tMessageCount
repeat for each item theNames in tName
put "<" && item theNames of tName && ">" after field "textDisplay"
put item tMessageCount of tMessage after field "textDisplay"
add 1 to tMessageCount
end repeat
However I get an error for the illustrated line in "range start expression". The variables all seem to be what they should be at this point. I looked at other people's solutions across the internet and tried "repeat with i = 1 to the number of lines of tName" instead but it didn't change anything. Still got the same error in the same place.