Search code examples
inno-setuppascalscript

Inno setup Error Invalid number of parameters on end;?


I do not know why show the error. Sorry for my english, i from polish.

[Tasks]
Name: czysto; Description: "Instalacja na CZYSTO (Kasuje zawartosc RES_MODS - ZALECANE!)"; Components: Dictionaries; Flags: exclusive
Name: normalna; Description: "Normalna Instalacja (dla zaawansowanych użytkowników)"; Components: Dictionaries; Flags: exclusive unchecked
Name: cache; Description: "Wyczysc pliki CACHE"; GroupDescription: "Dodatki:"; Components: Dictionaries; Flags: unchecked

[Code]
function NextButtonClick(CurPageID: Integer): Boolean;
begin
  Result := True;
  if (CurPageID = wpSelectTasks) and IsTaskSelected('czysto') then
  DelTree(ExpandConstant('{app}\test*'))
end; ERROR HERE!!!!!!!!!!!!!!!!!!!!!!!

Text Error: Invalid number of parameters.

Help...


Solution

  • DelTree takes several more parameters than the one you're supplying.

    function DelTree(const Path: String; 
      const IsDir, DeleteFiles, DeleteSubdirsAlso: Boolean): Boolean;
    

    You should bookmark the Inno Setup documentation for future reference.