Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#15

Re: Speichern Von daten aus einem array endet in leerer Date

  Alt 31. Jan 2009, 15:13
Habe mal einen Kommentar eingefügt.
Delphi-Quellcode:
Repeat
    c:=true;
    p:=pos(' ',hilf[i].Bots);
    tmpbot.Botname:=copy(hilf[i].Bots,1,p-1);
    Delete(hilf[i].Bots,1,p);
    hilf[i].Bots:=trim(hilf[i].bots);
    p:=pos(';',hilf[i].Bots);
    tmpbot.Botlvl:=strtoint(copy(hilf[i].Bots,1,p-1));
    j:=0;
    While (j<=high(bot)) AND c do
      Begin
        // c wird hier false, wenn bit[j].BotName=tmpbot.BotName und bot[j].Botname <> ''
        // und c wird in dieser Schleife nie wieder true. Ist das so gewollt?
        if (ansilowercase(bot[j].Botname)=ansilowercase(tmpbot.Botname)) And (Not (bot[j].Botname='')) then
        Begin
          c:=false;
          if tmpbot.Botlvl>bot[j].Botlvl then bot[j].Botlvl:=tmpbot.Botlvl;
        end
        ELSE
        Begin
          if c then
          Begin
            bot[j]:=tmpbot;
          end;
        end;
        inc(j);
      end;
    inc(i);
  until i=high(hilf);
Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat