Need Help for a Pod Racer Program - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need Help for a Pod Racer Program

war12321war12321 New JerseyPosts: 1Member

When I try to compile my program, the following error comes up. ((19,1) Error: Illegal expression, (19,11) Fatal: Syntax error, ";" expected but "identifier PLAYERMOVEMENT" found)

Program Final;

Uses crt;

Var movement:char; level, x, y, z, score, rand:Integer; Track:Array[1..10] of Integer;

Procedure field; Begin

For z:= 1 to 15 do Begin rand:= random(3)-1; Track[z]:= 20 + rand;


Procedure Playermovement; Begin

movemnt:=readkey; case movement of 'j':Begin gotoxy(x,15); write(''); x:=x-1; End;

'k':Begin gotoxy(x,15); write(''); x:=x+1; End;


Procedure layout; begin

y:=9; For z:= 1 to 15 do Begin

y:=y + 1; gotoxy(track[z, y); writeln(''); gotoxy(track[z] + 20, y); writeln(''); End; delay(100);


Procedure Trackmovement; Begin

For z:=15 downto 2 do Begin

Track[z]:=Track[z-1]; rand:= random(3)-1; Track[1]:=20 + rand; End;



cursoroff; level:= 1; points:= 0; writeln('Welcome to Podracer 2014!'); readkey; writeln('Would you like to start a new game? (y/n)'); readln;

writeln('Level: ', level);


track; layout; Playermovement; repeat Trackmovement; clrscr; layout;

gotoxy(25, 40); score:=score+level; write('Score: ', score);


until 1 = 2; readkey;


Can anyone help a lowly CompSci student?

Sign In or Register to comment.