Code not working

ok, so I have been using Rinky Dinks Labrys and have even edited an example to match my project. however, even the calibration doesn't work. Is there any library that works with Mega 2560 boards? the errors are listed below. that was just for the calibration. thanks in advance :slight_smile:

URTouch_Calibration:37: error: 'UTFT' does not name a type
URTouch_Calibration:49: error: 'URTouch' does not name a type
URTouch_Calibration.ino: In function 'void setup()':
URTouch_Calibration:68: error: 'myGLCD' was not declared in this scope
URTouch_Calibration:72: error: 'myTouch' was not declared in this scope
URTouch_Calibration:72: error: 'PORTRAIT' was not declared in this scope
URTouch_Calibration.ino: In function 'void drawCrossHair(int, int)':
URTouch_Calibration:80: error: 'myGLCD' was not declared in this scope
URTouch_Calibration.ino: In function 'void readCoordinates()':
URTouch_Calibration:96: error: 'myGLCD' was not declared in this scope
URTouch_Calibration:97: error: 'CENTER' was not declared in this scope
URTouch_Calibration:98: error: 'myTouch' was not declared in this scope
URTouch_Calibration:100: error: 'myTouch' was not declared in this scope
URTouch_Calibration.ino: In function 'void calibrate(int, int, int)':
URTouch_Calibration:132: error: 'myGLCD' was not declared in this scope
URTouch_Calibration:137: error: 'CENTER' was not declared in this scope
URTouch_Calibration:142: error: 'myTouch' was not declared in this scope
URTouch_Calibration.ino: In function 'void waitForTouch()':
URTouch_Calibration:147: error: 'myTouch' was not declared in this scope
URTouch_Calibration:148: error: 'myTouch' was not declared in this scope
URTouch_Calibration:149: error: 'myTouch' was not declared in this scope
URTouch_Calibration.ino: In function 'void startup()':
URTouch_Calibration:171: error: 'myGLCD' was not declared in this scope
URTouch_Calibration:176: error: 'CENTER' was not declared in this scope
URTouch_Calibration:181: error: 'LEFT' was not declared in this scope
URTouch_Calibration:195: error: 'LEFT' was not declared in this scope
URTouch_Calibration.ino: In function 'void done()':
URTouch_Calibration:217: error: 'myGLCD' was not declared in this scope
URTouch_Calibration:223: error: 'CENTER' was not declared in this scope
URTouch_Calibration:228: error: 'LEFT' was not declared in this scope
URTouch_Calibration:250: error: 'LEFT' was not declared in this scope
URTouch_Calibration.ino: In function 'void fail()':
URTouch_Calibration:276: error: 'myGLCD' was not declared in this scope
URTouch_Calibration:282: error: 'CENTER' was not declared in this scope
URTouch_Calibration:285: error: 'LEFT' was not declared in this scope
URTouch_Calibration.ino: In function 'void loop()':
URTouch_Calibration:298: error: 'myGLCD' was not declared in this scope
URTouch_Calibration:309: error: 'CENTER' was not declared in this scope
URTouch_Calibration:321: error: 'PORTRAIT' was not declared in this scope
URTouch_Calibration:321: error: 'LANDSCAPE' was not declared in this scope
URTouch_Calibration:326: error: 'PORTRAIT' was not declared in this scope
URTouch_Calibration:331: error: 'PORTRAIT' was not declared in this scope
URTouch_Calibration:352: error: 'PORTRAIT' was not declared in this scope
URTouch_Calibration:357: error: 'PORTRAIT' was not declared in this scope
URTouch_Calibration:380: error: 'PORTRAIT' was not declared in this scope
URTouch_Calibration:380: error: 'LANDSCAPE' was not declared in this scope

I have no experience with touchscreens on Arduino...
but if the IDE tells me that a bunch of variables in my code were not declared anywhere, I'd start by declaring them where it's needed.

I'm still new to this, how exactly would I declare something?

Take any example that comes with any library you are using: you'll notice that every variable, before being used, must be declared (aka defined, initialized...).

Eg, you can't make this sum

res = x+y;

without declaring res, x and y before the sum, by

 int res;
const int x = 2;
const int y = 3;
.
.
.
res = x+y;

Otherwise your code (like most programming languages) won't even know if they exist or what's their nature.

I assume you have edited the example by deleting a few lines you supposed weren't important, am I right?