1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41:
| procedure str_into_RichEdit(Liste1215:TStringList;Insert_Text:string; line:integer; position:integer); var h : integer; begin with Liste1215 do begin for h := Count to line-1 do Add(''); for h := length(Strings[line-1]) to position do Strings[line-1] := Strings[line-1] + ' '; Strings[line-1] := copy(Strings[line-1], 1, position-1) + Insert_Text + copy(Strings[line-1], position, length(Strings[line-1])); end; end;
procedure TSpiel.SaveGame(pFileName:String); var x,y,i:Integer; Inhalt:TStringList; begin Inhalt:=TStringList.Create; with Inhalt do begin add('Draw_Karte {'); for y:=0 to MapY do begin for x:=0 to MapX do begin if Map[x,y].Typ = Wand then str_into_RichEdit(inhalt,'#',y+IndexOf('Draw_Karte {')+2,x+1); end; end;
// Hier tritt der Fehler auf, warum weiß ich nicht.... for i:=0 to High(Platten) do begin with Platten[i] do begin if Typ = PlateX then begin if Speed = rx then begin str_into_RichEdit( inhalt,'-',y+IndexOf('Draw_Karte {')+2,x+1 ) end; end; end; end;
add('Draw_Karte }'); SaveToFile(pFileName); end; end; |