I get the strangest error when I try running my project with this code in it. Thing is this code works in another project, it should be code independant. What am I not seeing?

[pascal]procedure DrawTile(GameScreen: PSDL_Surface; X, Y, TileIndex, TileSize: Integer; TileSet: PSDL_Surface);
var
SrcRect, DestRect: TSDL_Rect;
begin
SrcRect := SDLRect(TileIndex * TileSize, 0, TileSize, TileSize);
DestRect := SDLRect(X, Y, TileSize, TileSize);
if ((X < GameScreen.w) or (X > -TileSize)) and ((Y < GameScreen.h) or (Y > -TileSize)) then
SDL_BlitSurface(TileSet, @SrcRect, GameScreen, @DestRect);
end;[/pascal]

w and h are the Width and Height of the game screen.

Here are the error messages I'm getting:

Quote Originally Posted by Messages
NightStalker2.lpr(359,26) Error: Illegal qualifier
NightStalker2.lpr(359,26) Hint: may be pointer dereference is missing
NightStalker2.lpr(359,13) Error: Operation "<" not supported for types "LongInt" and "PSDL_Surface"
NightStalker2.lpr(359,26) Fatal: Syntax error, ")" expected but "identifier W" found
oh FYI...
[pascal]if ((X < GameScreen.w) or (X > -TileSize)) and ((Y < GameScreen.h) or (Y > -TileSize)) then[/pascal] is line 359.