Sayfayı Yazdır | Pencereyi Kapat

Syntax error

Nereden Yazdırıldığı: Clomosy | Forum
Kategori: Genel Programlama
Forum Adı: Genel İşlemler
Forum Tanımlaması: TRObject dili ile programlama yaparken karşılaşılan genel işlemler
URL: https://forum.clomosy.com.tr/forum_posts.asp?TID=1549
Tarih: 03 Haziran 2026 Saat 22:32
Program Versiyonu: Web Wiz Forums 12.07 - https://www.webwizforums.com


Konu: Syntax error
Mesajı Yazan: Fatih Parlakkaya
Konu: Syntax error
Mesaj Tarihi: 03 Haziran 2026 Saat 19:58
var
  Form1: TclForm;


  pnlOyun: TclProPanel;
  pnlKontrol: TclPanel;
  pnlUst: TclPanel;

 
  lblBaslik: TclLabel;
  lblPuan: TclLabel;
  lblCan: TclLabel;
  lblSure: TclLabel;


  nisangah: TclCircle;

  hedef1, hedef2, hedef3, hedef4, hedef5: TclProPanel;
  lbl1, lbl2, lbl3, lbl4, lbl5: TclLabel;

 
  btnSol, btnSag, btnYukari, btnAsagi, btnAtes: TclProButton;
  btnYeniOyun: TclProButton;


  tmrOyun: TClTimer;
  tmrHedef: TClTimer;

  nisX, nisY: Integer;
  puan, can, sure: Integer;
  oyunDevam: Boolean;


procedure NisanSola;
begin
  if nisX > 10 then
  begin
    nisX := nisX - 20;
    nisangah.Position.X := nisX;
  end;
end;

procedure NisanSaga;
begin
  if nisX < 620 then
  begin
    nisX := nisX + 20;
    nisangah.Position.X := nisX;
  end;
end;

procedure NisanYukari;
begin
  if nisY > 60 then
  begin
    nisY := nisY - 20;
    nisangah.Position.Y := nisY;
  end;
end;

procedure NisanAsagi;
begin
  if nisY < 420 then
  begin
    nisY := nisY + 20;
    nisangah.Position.Y := nisY;
  end;
end;


function CarpismaMi(hedef: TclProPanel): Boolean;
begin
  Result := False;
  if (nisX + 40 > hedef.Position.X) and
     (nisX < hedef.Position.X + hedef.Width) and
     (nisY + 40 > hedef.Position.Y) and
     (nisY < hedef.Position.Y + hedef.Height) then
  begin
    Result := True;
  end;
end;


procedure OyunBitti;
begin
  oyunDevam := False;
  tmrOyun.Enabled := False;
  tmrHedef.Enabled := False;
  ShowMessage('OYUN BITTI! Toplam Puan: ' + IntToStr(puan));
end;



procedure AtesEt;
var
  carpti: Boolean;
begin
  if oyunDevam = False then Exit;

  carpti := False;

  
  if hedef1.Visible and CarpismaMi(hedef1) then
  begin
    carpti := True;
    puan := puan + 10;
    hedef1.Visible := False;
    lblPuan.Text := 'Puan: ' + IntToStr(puan);
    ShowMessage('DOGRU! Su - Enkaz altinda hayat kurtarir! +10 Puan');
  end;

  
  if hedef2.Visible and CarpismaMi(hedef2) then
  begin
    carpti := True;
    puan := puan + 10;
    hedef2.Visible := False;
    lblPuan.Text := 'Puan: ' + IntToStr(puan);
    ShowMessage('DOGRU! Ilk Yardim Kiti - Yara sarmak icin sart! +10 Puan');
  end;

  
  if hedef3.Visible and CarpismaMi(hedef3) then
  begin
    carpti := True;
    puan := puan + 10;
    hedef3.Visible := False;
    lblPuan.Text := 'Puan: ' + IntToStr(puan);
    ShowMessage('DOGRU! Fener - Karanlikta yol bulmak icin gerekli! +10 Puan');
  end;

  
  if hedef4.Visible and CarpismaMi(hedef4) then
  begin
    carpti := True;
    can := can - 1;
    hedef4.Visible := False;
    lblCan.Text := 'Can: ' + IntToStr(can);
    ShowMessage('YANLIS! Oyun konsolu cantaya girmez! -1 Can');
    if can <= 0 then OyunBitti;
  end;

  if hedef5.Visible and CarpismaMi(hedef5) then
  begin
    carpti := True;
    can := can - 1;
    hedef5.Visible := False;
    lblCan.Text := 'Can: ' + IntToStr(can);
    ShowMessage('YANLIS! Parfum ise yaramaz! -1 Can');
    if can <= 0 then OyunBitti;
  end;

  if carpti = False then
  begin

  end;
end;

procedure HedefleriYerlestir;
begin
  hedef1.Position.X := 50 + Random(500);
  hedef1.Position.Y := 80 + Random(300);
  hedef1.Visible := True;

  hedef2.Position.X := 50 + Random(500);
  hedef2.Position.Y := 80 + Random(300);
  hedef2.Visible := True;

  hedef3.Position.X := 50 + Random(500);
  hedef3.Position.Y := 80 + Random(300);
  hedef3.Visible := True;

  hedef4.Position.X := 50 + Random(500);
  hedef4.Position.Y := 80 + Random(300);
  hedef4.Visible := True;

  hedef5.Position.X := 50 + Random(500);
  hedef5.Position.Y := 80 + Random(300);
  hedef5.Visible := True;
end;


procedure SureGuncelle;
begin
  sure := sure - 1;
  lblSure.Text := 'Sure: ' + IntToStr(sure) + 's';
  if sure <= 0 then OyunBitti;
end;


procedure HedefYenile;
begin

  HedefleriYerlestir;
end;



procedure YeniOyun;
begin
  puan := 0; can := 3; sure := 60;
  oyunDevam := True;
  nisX := 310; nisY := 230;
  nisangah.Position.X := nisX;
  nisangah.Position.Y := nisY;

  lblPuan.Text := 'Puan: 0';
  lblCan.Text := 'Can: 3';
  lblSure.Text := 'Sure: 60s';

  HedefleriYerlestir;

  tmrOyun.Enabled := True;
  tmrHedef.Enabled := True;
end;



{
  Form1 := TclForm.Create(Self);
  Form1.SetFormColor('#0f172a', '', clGNone);
 
 
  pnlOyun := Form1.AddNewProPanel(Form1, 'pnlOyun');
  pnlOyun.Align := alClient;
  pnlOyun.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#1e293b');
  pnlOyun.SetclProSettings(pnlOyun.clProSettings);
 
  pnlUst := Form1.AddNewPanel(pnlOyun, 'pnlUst');
  pnlUst.Align := alTop;
  pnlUst.Height := 60;
 
  lblBaslik := Form1.AddNewLabel(pnlUst, 'lblBaslik', 'DEPREM CANTASI - VURMA OYUNU');
  lblBaslik.Align := alLeft;
  lblBaslik.Width := 280;
  lblBaslik.StyledSettings := ssFamily;
  lblBaslik.TextSettings.Font.Size := 14;
  lblBaslik.TextSettings.FontColor := clAlphaColor.clHexToColor('#f59e0b');
  lblBaslik.TextSettings.VertAlign := taCenter;
 
  lblPuan := Form1.AddNewLabel(pnlUst, 'lblPuan', 'Puan: 0');
  lblPuan.Align := alRight;
  lblPuan.Width := 90;
  lblPuan.StyledSettings := ssFamily;
  lblPuan.TextSettings.Font.Size := 13;
  lblPuan.TextSettings.FontColor := clAlphaColor.clHexToColor('#10b981');
  lblPuan.TextSettings.HorzAlign := taCenter;
  lblPuan.TextSettings.VertAlign := taCenter;
 
  lblCan := Form1.AddNewLabel(pnlUst, 'lblCan', 'Can: 3');
  lblCan.Align := alRight;
  lblCan.Width := 70;
  lblCan.StyledSettings := ssFamily;
  lblCan.TextSettings.Font.Size := 13;
  lblCan.TextSettings.FontColor := clAlphaColor.clHexToColor('#ef4444');
  lblCan.TextSettings.HorzAlign := taCenter;
  lblCan.TextSettings.VertAlign := taCenter;
 
  lblSure := Form1.AddNewLabel(pnlUst, 'lblSure', 'Sure: 60s');
  lblSure.Align := alRight;
  lblSure.Width := 90;
  lblSure.StyledSettings := ssFamily;
  lblSure.TextSettings.Font.Size := 13;
  lblSure.TextSettings.FontColor := clAlphaColor.clHexToColor('#60a5fa');
  lblSure.TextSettings.HorzAlign := taCenter;
  lblSure.TextSettings.VertAlign := taCenter;
 

  hedef1 := Form1.AddNewProPanel(pnlOyun, 'hedef1');
  hedef1.Align := alNone;
  hedef1.Position.X := 80; hedef1.Position.Y := 120;
  hedef1.Width := 80; hedef1.Height := 70;
  hedef1.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#14532d');
  hedef1.clProSettings.IsRound := True;
  hedef1.clProSettings.RoundHeight := 12; hedef1.clProSettings.RoundWidth := 12;
  hedef1.SetclProSettings(hedef1.clProSettings);
  lbl1 := Form1.AddNewLabel(hedef1, 'lbl1', #128167 + #13 + 'Su');
  lbl1.Align := alClient;
  lbl1.StyledSettings := ssFamily;
  lbl1.TextSettings.Font.Size := 18;
  lbl1.TextSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  lbl1.TextSettings.HorzAlign := taCenter;
  lbl1.TextSettings.VertAlign := taCenter;
  lbl1.HitTest := False;
 
  hedef2 := Form1.AddNewProPanel(pnlOyun, 'hedef2');
  hedef2.Align := alNone;
  hedef2.Position.X := 200; hedef2.Position.Y := 180;
  hedef2.Width := 80; hedef2.Height := 70;
  hedef2.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#14532d');
  hedef2.clProSettings.IsRound := True;
  hedef2.clProSettings.RoundHeight := 12; hedef2.clProSettings.RoundWidth := 12;
  hedef2.SetclProSettings(hedef2.clProSettings);
  lbl2 := Form1.AddNewLabel(hedef2, 'lbl2', #129657 + #13 + 'Ilk Yardim');
  lbl2.Align := alClient;
  lbl2.StyledSettings := ssFamily;
  lbl2.TextSettings.Font.Size := 13;
  lbl2.TextSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  lbl2.TextSettings.HorzAlign := taCenter;
  lbl2.TextSettings.VertAlign := taCenter;
  lbl2.HitTest := False;
 
  hedef3 := Form1.AddNewProPanel(pnlOyun, 'hedef3');
  hedef3.Align := alNone;
  hedef3.Position.X := 380; hedef3.Position.Y := 150;
  hedef3.Width := 80; hedef3.Height := 70;
  hedef3.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#14532d');
  hedef3.clProSettings.IsRound := True;
  hedef3.clProSettings.RoundHeight := 12; hedef3.clProSettings.RoundWidth := 12;
  hedef3.SetclProSettings(hedef3.clProSettings);
  lbl3 := Form1.AddNewLabel(hedef3, 'lbl3', #128294 + #13 + 'Fener');
  lbl3.Align := alClient;
  lbl3.StyledSettings := ssFamily;
  lbl3.TextSettings.Font.Size := 15;
  lbl3.TextSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  lbl3.TextSettings.HorzAlign := taCenter;
  lbl3.TextSettings.VertAlign := taCenter;
  lbl3.HitTest := False;
 
  hedef4 := Form1.AddNewProPanel(pnlOyun, 'hedef4');
  hedef4.Align := alNone;
  hedef4.Position.X := 500; hedef4.Position.Y := 200;
  hedef4.Width := 80; hedef4.Height := 70;
  hedef4.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#7f1d1d');
  hedef4.clProSettings.IsRound := True;
  hedef4.clProSettings.RoundHeight := 12; hedef4.clProSettings.RoundWidth := 12;
  hedef4.SetclProSettings(hedef4.clProSettings);
  lbl4 := Form1.AddNewLabel(hedef4, 'lbl4', #127918 + #13 + 'Konsol');
  lbl4.Align := alClient;
  lbl4.StyledSettings := ssFamily;
  lbl4.TextSettings.Font.Size := 15;
  lbl4.TextSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  lbl4.TextSettings.HorzAlign := taCenter;
  lbl4.TextSettings.VertAlign := taCenter;
  lbl4.HitTest := False;
 
  hedef5 := Form1.AddNewProPanel(pnlOyun, 'hedef5');
  hedef5.Align := alNone;
  hedef5.Position.X := 300; hedef5.Position.Y := 280;
  hedef5.Width := 80; hedef5.Height := 70;
  hedef5.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#7f1d1d');
  hedef5.clProSettings.IsRound := True;
  hedef5.clProSettings.RoundHeight := 12; hedef5.clProSettings.RoundWidth := 12;
  hedef5.SetclProSettings(hedef5.clProSettings);
  lbl5 := Form1.AddNewLabel(hedef5, 'lbl5', #129349 + #13 + 'Parfum');
  lbl5.Align := alClient;
  lbl5.StyledSettings := ssFamily;
  lbl5.TextSettings.Font.Size := 15;
  lbl5.TextSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  lbl5.TextSettings.HorzAlign := taCenter;
  lbl5.TextSettings.VertAlign := taCenter;
  lbl5.HitTest := False;
 
  nisangah := Form1.AddNewCircle(pnlOyun, 'nisangah');
  nisangah.Align := alNone;
  nisangah.Position.X := 310;
  nisangah.Position.Y := 230;
  nisangah.Width := 50;
  nisangah.Height := 50;
  nisangah.Fill.Color := clAlphaColor.clHexToColor('#00000000'); 
  nisangah.Stroke.Color := clAlphaColor.clHexToColor('#f59e0b');
  nisangah.Stroke.Thickness := 3;
 
  pnlKontrol := Form1.AddNewPanel(pnlOyun, 'pnlKontrol');
  pnlKontrol.Align := alBottom;
  pnlKontrol.Height := 170;
 
  btnSol := Form1.AddNewProButton(pnlKontrol, 'btnSol', '<');
  btnSol.Align := alNone;
  btnSol.Position.X := 10; btnSol.Position.Y := 45;
  btnSol.Width := 90; btnSol.Height := 70;
  btnSol.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#334155');
  btnSol.clProSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  btnSol.clProSettings.FontSize := 22;
  btnSol.clProSettings.IsRound := True;
  btnSol.clProSettings.RoundHeight := 15; btnSol.clProSettings.RoundWidth := 15;
  btnSol.SetclProSettings(btnSol.clProSettings);
  Form1.AddNewEvent(btnSol, tbeOnClick, 'NisanSola');
 
  btnSag := Form1.AddNewProButton(pnlKontrol, 'btnSag', '>');
  btnSag.Align := alNone;
  btnSag.Position.X := 110; btnSag.Position.Y := 45;
  btnSag.Width := 90; btnSag.Height := 70;
  btnSag.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#334155');
  btnSag.clProSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  btnSag.clProSettings.FontSize := 22;
  btnSag.clProSettings.IsRound := True;
  btnSag.clProSettings.RoundHeight := 15; btnSag.clProSettings.RoundWidth := 15;
  btnSag.SetclProSettings(btnSag.clProSettings);
  Form1.AddNewEvent(btnSag, tbeOnClick, 'NisanSaga');
 
  btnYukari := Form1.AddNewProButton(pnlKontrol, 'btnYukari', '^');
  btnYukari.Align := alNone;
  btnYukari.Position.X := 60; btnYukari.Position.Y := 5;
  btnYukari.Width := 90; btnYukari.Height := 35;
  btnYukari.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#334155');
  btnYukari.clProSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  btnYukari.clProSettings.FontSize := 16;
  btnYukari.clProSettings.IsRound := True;
  btnYukari.clProSettings.RoundHeight := 10; btnYukari.clProSettings.RoundWidth := 10;
  btnYukari.SetclProSettings(btnYukari.clProSettings);
  Form1.AddNewEvent(btnYukari, tbeOnClick, 'NisanYukari');
 
  btnAsagi := Form1.AddNewProButton(pnlKontrol, 'btnAsagi', 'v');
  btnAsagi.Align := alNone;
  btnAsagi.Position.X := 60; btnAsagi.Position.Y := 120;
  btnAsagi.Width := 90; btnAsagi.Height := 35;
  btnAsagi.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#334155');
  btnAsagi.clProSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  btnAsagi.clProSettings.FontSize := 16;
  btnAsagi.clProSettings.IsRound := True;
  btnAsagi.clProSettings.RoundHeight := 10; btnAsagi.clProSettings.RoundWidth := 10;
  btnAsagi.SetclProSettings(btnAsagi.clProSettings);
  Form1.AddNewEvent(btnAsagi, tbeOnClick, 'NisanAsagi');
 
  btnAtes := Form1.AddNewProButton(pnlKontrol, 'btnAtes', 'ATES!');
  btnAtes.Align := alNone;
  btnAtes.Position.X := 230; btnAtes.Position.Y := 30;
  btnAtes.Width := 200; btnAtes.Height := 100;
  btnAtes.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#dc2626');
  btnAtes.clProSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  btnAtes.clProSettings.FontSize := 24;
  btnAtes.clProSettings.IsRound := True;
  btnAtes.clProSettings.RoundHeight := 20; btnAtes.clProSettings.RoundWidth := 20;
  btnAtes.SetclProSettings(btnAtes.clProSettings);
  Form1.AddNewEvent(btnAtes, tbeOnClick, 'AtesEt');
 
  btnYeniOyun := Form1.AddNewProButton(pnlKontrol, 'btnYeniOyun', 'YENI OYUN');
  btnYeniOyun.Align := alNone;
  btnYeniOyun.Position.X := 480; btnYeniOyun.Position.Y := 50;
  btnYeniOyun.Width := 150; btnYeniOyun.Height := 60;
  btnYeniOyun.clProSettings.BackgroundColor := clAlphaColor.clHexToColor('#0284c7');
  btnYeniOyun.clProSettings.FontColor := clAlphaColor.clHexToColor('#FFFFFF');
  btnYeniOyun.clProSettings.FontSize := 16;
  btnYeniOyun.clProSettings.IsRound := True;
  btnYeniOyun.clProSettings.RoundHeight := 15; btnYeniOyun.clProSettings.RoundWidth := 15;
  btnYeniOyun.SetclProSettings(btnYeniOyun.clProSettings);
  Form1.AddNewEvent(btnYeniOyun, tbeOnClick, 'YeniOyun');
 
  tmrOyun := Form1.AddNewTimer(Form1, 'tmrOyun', 1000);
  tmrOyun.Enabled := False;
  Form1.AddNewEvent(tmrOyun, tbeOnTimer, 'SureGuncelle');
 
  tmrHedef := Form1.AddNewTimer(Form1, 'tmrHedef', 3000);
  tmrHedef.Enabled := False;
  Form1.AddNewEvent(tmrHedef, tbeOnTimer, 'HedefYenile');
 
  YeniOyun;
}
Unit Main: Syntax error.
Source position: 220,1
hatası veriyor hatayı maalesef çözemedim
https://static.cloudflareinsights.com/beacon.min.js/v833ccba57c9e4d2798f2e76cebdd09a11778172276447" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/v833ccba57c9e4d2798f2e76cebdd09a11778172276447" integrity="sha512-57MDmcccJXYtNnH+ZiBwzC4jb2rvgVCEokYN+L/nLlmO8rfYT/gIpW2A569iJ/3b+0UEasghjuZH/ma3wIs/EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">



Sayfayı Yazdır | Pencereyi Kapat

Forum Software by Web Wiz Forums® version 12.07 - https://www.webwizforums.com
Copyright ©2001-2024 Web Wiz Ltd. - https://www.webwiz.net