Bei folgender Funktion trit der Fehler auf das er schon in der Ersten Zeile False zurückgibt, vorher bei der "Debug" abfrage allerdings der Wert True zurückgegeben wird. Daher Stellt sich mir die Frage ob die Anzahl der if Abfragen in einer if verzweigung begrenzt sind??
Delphi-Quellcode:
function TswOptions.CheckIni(Skin: String):Boolean;
var
IFile: TMemIniFile;
Test: Boolean;
begin
try
IFile := TMemIniFile.Create(Skin);
// Überprüfung ob die Skindatei vollständig ist
Test := IFile.SectionExists('swMain'); // Debug
if IFile.SectionExists('swMain') and
IFile.SectionExists('swExit') and
IFile.SectionExists('swMapeditor') and
IFile.SectionExists('swSingleplayer') and
IFile.SectionExists('swMultiplayer') and
IFile.SectionExists('swRefresh') and
IFile.SectionExists('swJoin') and
IFile.SectionExists('swCancel') and
IFile.SectionExists('swHost') and
IFile.SectionExists('swmHost') and
IFile.SectionExists('swNames') and
IFile.SectionExists('swIPList') and
IFile.SectionExists('swLIBevel') and
IFile.SectionExists('swIPBevel') and
IFile.SectionExists('swLogIn') and
IFile.SectionExists('swCancelLI') and
IFile.SectionExists('swAPLogo') and
IFile.SectionExists('swPassEdit') and
IFile.SectionExists('swUserEdit') and
IFile.SectionExists('swIPCancel') and
IFile.SectionExists('swhCommentEdit') and
IFile.SectionExists('swhPasswordEdit') and
IFile.SectionExists('swOptions') and
IFile.SectionExists('swPlayerBox') and
IFile.SectionExists('swTeamBox') and
IFile.SectionExists('swMapLabel') and
IFile.SectionExists('swGSpeedBox') and
IFile.SectionExists('swHBevel') and
IFile.SectionExists('swOFileListBox') and
IFile.SectionExists('swOSelectSkin') and
IFile.SectionExists('swOApply') and
IFile.SectionExists('swOCancel') and
IFile.SectionExists('swOSearchIni') and
IFile.SectionExists('swOSoundChannelBox') and
IFile.SectionExists('swOBevel') and
// Zweites Fenster
IFile.SectionExists('smMain') and
IFile.SectionExists('smSearchBoxEdit') and
IFile.SectionExists('smSelectMap') and
IFile.SectionExists('smCancel') and
IFile.SectionExists('smFileListBox') then
Result := True else Result := False;
IFile.Free;
except
MessageDlg('Error: Unable to open skin file',mtInformation, [mbOk], 0);
end;
end;
Felix K.