![]() |
Re: Function in Unit / Zugriff von anderen Units
Zitat:
|
Re: Function in Unit / Zugriff von anderen Units
Delphi-Quellcode:
unit mTlocation;
interface // Wenn ich die function hier deklariere kennt er TFeldInhalt nicht uses extctrls; type TFeldInhalt = (Boden, Mauer, TrOnEnter, TrOnUse, TrOnCollision, TrChangeLoc,_); TFigurenImage = class(TImage) private FX: integer; FY: integer; public {funktionen *********************************} function GetXWert: integer; function GetYWert: integer; {prozeduren *********************************} procedure SetXWert(value: integer); procedure SetYWert(value: integer); end; TFeld = class(Tobject) FigurenImage: TFigurenimage; private FFigurenIndex: integer; FInhalt: TFeldInhalt; FID: string; public {funktionen *********************************} function GetFigurenIndex: integer; function GetInhalt: TFeldInhalt; function GetID: string; {prozeduren *********************************} procedure SetFigurenIndex(value: integer); procedure SetInhalt(value: TFeldInhalt); procedure SetID(value: string); end; TLocation = class(Tobject) private public Felder: array[1..20,1..20] of TFeld; end; //Hier Habe ich besagten Error function InhatlToStr(I: TFeldInhalt): string; implementation function InhaltToStr(I: TFeldInhalt): string; begin case I of Boden: result := 'StGrd'; Mauer: result := 'StWal'; TrOnEnter: result := 'TrOnE'; TrOnUse: result := 'TrOnU'; TrOnCollision: result := 'TrOnC'; else result := '' end end; // [..] end. |
Re: Function in Unit / Zugriff von anderen Units
Du hast die function falsch geschrieben
function InhatlToStr(I: TFeldInhalt): string; |
Re: Function in Unit / Zugriff von anderen Units
Das gibts doch nicht ! :wall: :wall: :wall: :wall: :wall: :wall: :wall:
Da hängt man ne stunde über so ner banalen sache und dann stellt sich raus, dass es ein RECHTSCHREIBFEHLER ist... Naja vielen Dank für die schnelle Hilfe Richard |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:21 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz