When I try to compile a program under v1.8, I get:
Compiling code. Error
Value cannot be null.
Parameter name: dictionary
This doesn't happen on the first compile after launching b4a; only on second and subsequent compiles. I have to relaunch b4a after every compile, whether or not that compile was successful.
See how all the keywords and variables are shown in RED as unrecognised. The problem seems to lie in your unusual loop formatting, specifically multiple Next keywords on the same line.