I am an amateur in Lua, l wrote this code but fail to compile, l have checked the structure of the syntax and found that it was a match, so l really do not know what is wrong, it says that 18: 'end' expected (to close 'if' at line 16) near 'startFishing' but why should l do that????? BTW startFishing is another function that l defined previously in the same file.
function detectSuccess()
local count = 0;
for x = 448, 1140, 140 do
color = getColor(x, 170);
if color == 0xffffff then
return false
startFishing()
else
return true
end
end
end
startFishing()afterreturn??