strange. In basis.pas, line 166, thoe compiler does not know the variable "main.prot". But in all the lines above there are lots of "main.*" variables. And all of them are global.
I couldn't try your code (to many addictional libraries I miss). If in line 160 I write Main. teh IDE shows also 'prot' in the list of availabe instances.
Can you post the compiler's error ?