Einzelnen Beitrag anzeigen

Madeleine

Registriert seit: 27. Dez 2002
31 Beiträge
 
#1

Fehler: Anweisung für For-Schleifenvariable 'i'???

  Alt 6. Jan 2003, 00:59
Wo soll denn hier der Fehler sein?
Delphi-Quellcode:
count1:=0;
count2:=0;
for i:=1 to FeldBreite-1 do //Anweisung für FOR-Schleifenvariablen 476
begin
y:=0;
x:=i;
while (x>=0) and (x<Feldbreite)
and (y>=0) and (y<FeldHoehe) do
begin
     if feld[x,y]=2 then inc(count2) else count2:=0;
            if count2=3 then begin
            Computerspalte:=y+1;
            Computersetzt;
            exit;
            end;
      if feld[x,y]=1 then inc(count1) else count1:=0;
            if count1=3 then begin
            Computerspalte:=y+1;
            Computersetzt;
            exit;
            end;
      x:=x+1;
      y:=y+1;
end;
end;
  Mit Zitat antworten Zitat