Multiple "Not Declared In This Scope" Errors

Where did you get the original code from?