All pastes #779401 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-18 10:32 UTC
rendered paste body
procedure loadCoords();
var
  fileContents, map, name: string;
  parts: tStringArray;
  x, y: single;
  i: byte;
begin
  fileContents := readFile(COORDSFILE);
  parts := xSplit(fileContents, #10);
      
  for i := 0 to arrayHigh(parts) do begin
    map := getPiece(parts[i], '///', 0);
    x := strToFloat(getPiece(parts[i], '///', 1));
    y := strToFloat(getPiece(parts[i], '///', 2));
    name := getPiece(parts[i], '///', 3);
  
    writeln('[Teleport] Coordinate ' + name + ' at ' + floatToStr(x) + ' ' + floatToStr(y) + ' ('+ map +')');
  end;
end;