Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #1

Open
vtrx-az opened this issue Jan 29, 2023 · 1 comment
Open

Compile error #1

vtrx-az opened this issue Jan 29, 2023 · 1 comment

Comments

@vtrx-az
Copy link

vtrx-az commented Jan 29, 2023

I tried to compile and there are many errors.
First snippet with errors in the variables:

function gererCollisions(position : TPoint; joueur : TImage; unRectangle : TRectangle; detruireObjetTouche: boolean):TCollision;
begin
var enCollision := false;
for var recChild in unRectangle.Children do begin
var unEnfant : TImage := recChild as TImage;
if (position.X > unEnfant.Position.X) and (position.X < unEnfant.Position.X + unEnfant.Width) and
(position.y + joueur.Height > unEnfant.Position.Y) and (position.y < unEnfant.Position.Y + unEnfant.Height) then begin
enCollision := true;
result.objet := unEnfant;
if detruireObjetTouche then unEnfant.free;
break;
end;
end;
result.enCollision := enCollision;
end;

@gbegreg
Copy link
Owner

gbegreg commented Jul 31, 2023

Can you give more details on errors ?
This project need at least Delphi 10.3 (I use inline variable and type inference).

If you used an older version of Delphi, you need to modify the code to change all variables declarations...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants