Since yesterday I am receiving a warning:
BLOCK/SCANNED STATEMENTS NOT ALLOWED HERE.
FireFly opens another form in the editor (not always the same) and places the cursor at the beginning of the code. I had made no changes to the code. Any idea what causes this or where I could look for the error?
Rolf
Dear Rolf,
have you tried opening the file in the PB-editor? Sometimes helps for this kind of error.
Wilko
Hi Rolf,
I remember seeing errors like that one and after investigating it usually comes down to me having accidently deleting an END SUB or END FUNCTION thus causing subsequent statements that can not go into a Sub/Function to produce an error.
Thanks Wilko and Paul,
opening the project in JellyBean etc. I had tried already. I think Paul's idea might touch the problem. I had something similar before. I'll give that a try.
Rolf
Quote from: Rolf Brandt on June 30, 2015, 06:44:33 AM
Since yesterday I am receiving a warning:
BLOCK/SCANNED STATEMENTS NOT ALLOWED HERE.
FireFly opens another form in the editor (not always the same) and places the cursor at the beginning of the code. I had made no changes to the code. Any idea what causes this or where I could look for the error?
Rolf
Hi Rolf;
I sometimes get bit by this because of my dyslexic fingers, and code similar to the example below. Notice the errant space in what should be a 'THEN'. For some reason, the compiler treats this a the beginning of a compound IF, and since there's no END IF, the 'block statement not allowed here' can be tripped. Apparently, the compiler reconciles those type things before deciding that there is no 'The' or 'nMyVar' function.
ID IsTrue(%True) The nMyVar = 1
a = 1
b = 2
etc
Thanks Nathan, I will check into that direction too.
Rolf
Paul,
Have you thought of stitching the individual files into one large (temporary) file just for compile time. I would think it might be much easier for your code to figure out where that error actually is. I haven't tried this myself and can imagine that It might create problems if the file size gets too large. Just a thought.
I ran into this error today too! In my case, I had appended a sub to a file, without ending it with "END SUB". Then, when I compiled, I got this error in a different module/form, not in the one with the error. Maybe this helps you.
(Is actually similar to what Paul described)
Regards,
Wilko
Thanks Wilko,
I guess that is exatly my problem. I will check other module that I have changed lately.
Rolf
Thanks to all for the helpful hints. This is what caused the problem (see picture).
I had deleted some code that was already commented for deletion and I had deleted Lf too. So there was no END FEUNCTION anymore.
Rolf