Simple numbers game syntax error lazarus / 61-Beginners ---------------------------------------------------------------------- Sukuna · 2025-04-12 08:00 Hello, I am following this YT tutorial https://www.youtube.com/watch?v=oyCwGhqxFUg&list=PLB24C56953A79987A&in dex=14  and finished this numbers game. However when I run it, it gives me an error message with UNTIL. program project10; {$mode objfpc}{$H+} uses   crt,   {$IFDEF UNIX}   cthreads,   {$ENDIF}   Classes   { you can add units after this }; var   answer:integer;   guess:integer;   cnt:integer;   error:integer;   game:char;   UI:string; begin   repeat     clrscr;     writeln('Please select a game: A B or C');     writeln('A) 1 - 10');     writeln('B) 1 - 100');     writeln('C) 1 - 1000');     writeln('Please select: ');     readln(game);   until (game = 'A') or (game = 'a') or (game = 'B') or (game = 'b') or (game = 'C') or (game = 'c') ;   clrscr;   case game of   'A','a':begin     answer := random(10)+1;     writeln('Game 1 - 10 was selected');   end;   'B','b':begin     answer := random(100)+1;     writeln('Game 1 - 100 was selected');   end;   'C','c':begin     answer := random(1000)+1;     writeln('Game 1 - 1000 was selected');   end;   end; repeat   repeat   writeln('Please enter a guess: ');   readln(UI);   val(UI,guess,error);     if error <> 0 then     writeln('Enter another selection')   until error = 0   cnt := cnt+1;     if guess > answer then     writeln('Guess too high')     else if guess < answer then     writeln('Guess too low')       else       writeln('You guessed my number in ', cnt,' guesses');   until  guess = answer;   readln; end. ---------------------------------------------------------------------- Fibonacci · 2025-04-12 08:08 When posting pascal code use [code=pascal]here your code[/code] BB tags. Missing semicolon at line 55. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program project10; {$mode objfpc}{$H+} uses  crt,  {$IFDEF UNIX}  cthreads,  {$ENDIF}  Classes  { you can add units after this }; var  answer:integer;  guess:integer;  cnt:integer;  error:integer;  game:char;  UI:string;begin  repeat    clrscr;    writeln('Please select a game: A B or C');    writeln('A) 1 - 10');    writeln('B) 1 - 100');    writeln('C) 1 - 1000');    writeln('Please select: ');    readln(game);  until (game = 'A') or (game = 'a') or (game = 'B') or (game = 'b') or (game = 'C') or (game = 'c') ;   clrscr;   case game of  'A','a':begin    answer := random(10)+1;    writeln('Game 1 - 10 was selected');  end;  'B','b':begin    answer := random(100)+1;    writeln('Game 1 - 100 was selected');  end;  'C','c':begin    answer := random(1000)+1;    writeln('Game 1 - 1000 was selected');  end;  end; repeat  repeat  writeln('Please enter a guess: ');  readln(UI);  val(UI,guess,error);    if error <> 0 then    writeln('Enter another selection')  until error = 0   cnt := cnt+1;     if guess > answer then    writeln('Guess too high')    else if guess < answer then    writeln('Guess too low')      else      writeln('You guessed my number in ', cnt,' guesses');  until  guess = answer;    readln;end. ---------------------------------------------------------------------- Sukuna · 2025-04-12 08:33 Thank you it worked. ---------------------------------------------------------------------- Bart · 2025-04-12 12:26 Since you are using crt unit, instead of using readln(game), you can do something like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    //draw the menu   repeat     game := upcase(readkey);   until (game in ['A','B','C'];   write(game) //echo the chocie made to the console It looks just a little bit nicer.... Bart