Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

"X cannot be resolved to a variable" means the compiler...