I'll be trying to call a function from elsewhere in the program and I get the "Undeclared identifier" error. Here's an example:
if GameParams.ClassicMode and not GameParams.GameResult.gSuccess then
begin
if not TGameBaseScreen.TryLoadReplay then
begin
fReplayManager.Clear(true);
end;
end;
I'm working in a unit called LemGame.pas
. In the above case, TGameBaseScreen
is underlined as Undefined identifier.
I'm almost certain that this method/class (not sure exactly what it is tbh) belongs to a unit called GameBaseScreenCommon.pas
, but when I type GameBaseScreenCommon
in the list of uses
at the top of LemGame.pas
, I get a circular reference error. So, LemGame
and GameBaseScreenCommon
are apparently already connected.
There is a big list of types, classes and procedures at the top of LemGame
. I'm pretty sure I need to be referencing TGameBaseScreen
here, but I don't know exactly where or as what. i.e. class, function, procedure, variable, type, etc.
Complete beginner, as I'm sure you can tell. If you do reply, I likely won't know exactly what you mean at first. I've already watched a bunch of videos about the way that Delphi (and other languages) are structured, in theory. The problems always come when you're actually working on something and it's more complicated than printing "Hello World" or doing some sort of number calculation.