Please format code using the button that looks like </> - it helps to preserve things like backslashes that appear to be missing from your code.
When using an if… then… else… both evaluation paths have to return the same type - you are returning a string from the ‘then’ and an integer from the ‘else’.
You also have, in the ‘then’ path
((following text of last " " of line whose (it contains “Result”) of file)
This doesn’t have enough information for the inspector to know where to look (it can’t guess at which file you want from the contents of the ‘if’ clause.
As a starting point, try:
(following text of last " " of it) of lines whose (it contains "Result") of files whose (name of it as lowercase starts with "abcd") of folders "__BESDATA\CustomSite_Hughes_BigFix_Content_Dev__Download" of storage folder of client
It won’t return you your -1 if the file doesn’t exist, or the file doesn’t contains a ‘Result’ line though.