See script at bottom.
-- Unused variables:
show window "untitled 14" selection {980, 982} -- unused var: ht
-- set ht to newB - newT
show window "untitled 14" selection {906, 908} -- unused var: ht
-- set ht to newB - newT
Un-commenting "-- set ht to 0" removes errors.
Sure looks like a BUG in Smile to me.
property ht : 0
property newB : 0
property newL : 0
property newR : 0
property newT : 0
set currentLineItem to "Tex-Edit Plus 44 800 1440 0 0" -- tab seperated items
set newL to ""
set newT to ""
set newR to ""
set newB to ""
set wd to ""
set ht to ""
-- parse out data
set AppleScript's text item delimiters to {tab}
-- use temp to evaluate variables, don't overwrite defaults
set temp to text item 2 of currentLineItem
if temp ≠ "" then set newL to temp as integer
set temp to text item 3 of currentLineItem
if temp ≠ "" then set newT to temp as integer
set temp to text item 4 of currentLineItem
if temp ≠ "" then set newR to temp as integer
set temp to text item 5 of currentLineItem
if temp ≠ "" then set newB to temp as integer
set wd to text item 6 of currentLineItem as integer
set ht to text item 7 of currentLineItem as integer
set x to processExcel()
set x to processWord()
on processExcel()
-- set ht to 0
set ht to newB - newT
end processExcel
on processWord()
-- set ht to 0
set ht to newB - newT
end processWord