mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
fixed typos and added FindClose to search function
This commit is contained in:
parent
f0ee52f892
commit
550dbae0c7
Binary file not shown.
@ -32,9 +32,9 @@ begin
|
||||
Result := TStringList.Create;
|
||||
|
||||
// Find all files
|
||||
if FindFirst(Mask, Attr, eSearch) = 0 then begin
|
||||
if (FindFirst(Mask, Attr, eSearch) = 0) then begin
|
||||
repeat
|
||||
if eSearch.Name[1] <> '.' then begin
|
||||
if (eSearch.Name[1] <> '.') then begin
|
||||
if ShowPath then begin
|
||||
if ((eSearch.Attr and Attr) = eSearch.Attr) and ((eSearch.Attr and faDirectory) <> eSearch.Attr) then
|
||||
Result.Add(ExtractFilePath(Mask) + eSearch.Name)
|
||||
@ -55,8 +55,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
until FindNext(eSearch) <> 0;
|
||||
until (FindNext(eSearch) <> 0);
|
||||
end;
|
||||
|
||||
SysUtils.FindClose(eSearch);
|
||||
end;
|
||||
|
||||
function GetSteamAppsDir: String;
|
||||
|
@ -325,7 +325,7 @@ begin
|
||||
frmMain.ggeItem.MaxValue := DirList.Count;
|
||||
|
||||
if (SteamInstall) and (GetProcessID('Steam.exe') <> -1) then begin
|
||||
if MessageBox(frmMain.Handle, 'Steam is still running. It is necersarry to shut it down before you install AMX Mod X. Shut it down now?', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNO) = mrYes then begin
|
||||
if MessageBox(frmMain.Handle, 'Steam is still running. It is necessary to shut it down before you install AMX Mod X. Shut it down now?', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNO) = mrYes then begin
|
||||
AddStatus('Shutting down Steam...', clBlack, False);
|
||||
if GetProcessID('Steam.exe') = -1 then
|
||||
AddDone
|
||||
|
@ -317,7 +317,7 @@ begin
|
||||
ChosenMod := modNone;
|
||||
ePath := LowerCase(GetModPathName(trvMods.Selected.Text));
|
||||
if gMultiAccount then
|
||||
SteamPath := GetSteamAppsDir + trvMods.Selected.Parent.Text + '\dedicated server\'; // setting this path for a user with only one account is not neccessary
|
||||
SteamPath := GetSteamAppsDir + trvMods.Selected.Parent.Text + '\dedicated server\'; // setting this path for a user with only one account is not necessary
|
||||
// ask for additional mods...
|
||||
if (ePath = 'cstrike') or (ePath = 'czero') then begin
|
||||
if MessageBox(Handle, 'Install Counter-Strike addon?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNO) = mrYes then
|
||||
@ -367,7 +367,7 @@ begin
|
||||
if frbListenServer.Checked then begin
|
||||
ChosenMod := modNone;
|
||||
if gMultiAccount then
|
||||
SteamPath := GetSteamAppsDir + trvMods.Selected.Parent.Text + '\'; // setting this path for a user with only one account is not neccessary
|
||||
SteamPath := GetSteamAppsDir + trvMods.Selected.Parent.Text + '\'; // setting this path for a user with only one account is not necessary
|
||||
ePath := trvMods.Selected.Text;
|
||||
if DirectoryExists(SteamPath + ePath + '\' + GetModPathName(ePath)) then
|
||||
ePath := SteamPath + ePath + '\' + GetModPathName(ePath)
|
||||
@ -530,7 +530,7 @@ begin
|
||||
end;
|
||||
|
||||
if trvMods.Items.Count = 0 then
|
||||
MessageBox(Handle, 'You haven''t installed any Steam games yet. It is neccessary to do that if you want to install AMX Mod X on a listen server.', 'Error', MB_ICONERROR)
|
||||
MessageBox(Handle, 'You haven''t installed any Steam games yet. It is necessary to do that if you want to install AMX Mod X on a listen server.', 'Error', MB_ICONERROR)
|
||||
else begin
|
||||
jspSelectMod.Show;
|
||||
trvMods.Selected := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user