The error message appears unrelated to your script.
As an aside, the first ls is Useless. You might want to use stat instead of ls in order to get easily machine-parsed file sizes.
Also, you seem to have a complex of syntax errors before the "then". You need spaces inside the square brackets, a semicolon before the "then", and a dollar before the parentheses.
for f in *
do
if [ $(ls -l "$f" | awk '{ print $5 }') -gt $1 ]; then
echo "$f"
fi
done
The file name might contain whitespace, in which case $9 is only the first word of the file name. Also you are ignoring the requirement to only print file names over a particular size.