Delphier icon indicating copy to clipboard operation
Delphier copied to clipboard

Compile error

Open vtrx-az opened this issue 2 years ago • 1 comments
trafficstars

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;

vtrx-az avatar Jan 29 '23 14:01 vtrx-az

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...

gbegreg avatar Jul 31 '23 16:07 gbegreg