All my variables becomes red, can't compile anymore

Put Claude

Active Member
Licensed User
Longtime User
Hi guys,

In a long coding session, suddenly on a recompile, all my variable become red and B4A wil not compile anymore.
Trying other apps wil compile normaly'
How can I repair this?
Look to this error

Compiling code. Error
Error parsing program.
Error description: Sub sub is not a valid identifier.

Put Claude Belgium
 

Put Claude

Active Member
Licensed User
Longtime User
Resolved variables in red

Thanks a lot

Yes...Yes, I typed:
'
Sub
Sub
,
on 2 lines

Put Claude Belgium
 

Roger Garstang

Well-Known Member
Licensed User
Longtime User
I've gotten these a couple times. Almost always a partial or double sub. I usually forget a End Sub or start a sub and switch tabs or something and forget about it. I think this is in an FAQ document somewhere too. If detected right away B4A should color the Tab text red or something when it detects errors like that. Seems this one it detects later though in parsing and gets confused and colors everything red...sometimes even other files.
 

THarriss

New Member
Licensed User
Longtime User
Same issue

Everything was working fine, then I added a new Sub and saved and quit. The next time I opened it all my Subs and variables were red.

I have quadruple checked the code for any Sub Sub entries, but everything is fine.

I have uninstalled and reinstalled the latest version.

If I delete the last Sub I added, everything is fine again, but when I try to add any new subs it turns red immediately and stays red.

If I delete the new sub, then save, then close everything, then reopen everything, it will let me add a new sub without turning red immediately, but if I save it, then reopen it, ALL the subs are red again until I delete the last sub I entered.

Very frustrating! Any help would be good here. :sign0104:

>>Update... Found out there was a missing quote on one of the lines in the "bad" sub... my guess is that by not ending the string, it was including the "End Sub" several lines later as part of the string, and thus leaving me with a Sub with no end...
 
Last edited:
Top