PDA

View Full Version : Argument 1 must be of type string


Sheritlw
09-27-2004, 06:02 PM
I have 3 packages that only get installed if selected. I created 3 Select Install Folder screens, 1 for each package. I have put the following code into the next action of the Select Packages screen and similiar code in the next action portion of the Install Folder screens and get the error "Argument 1 must be of type string" when I click Next. HELP!!

if (SetupData.GetPackageProperties(UserSetup)) then
Screen.Next();
else
if (SetupData.GetPackageProperties(DatabaseSetup)) then
Screen.Jump(InstallDataFiles);
else
if (SetupData.GetPackageProperties(Utilities)) then
Screen.Jump(InstallUtilities);
else
Screen.End();
end
end
end

Lorne
09-27-2004, 06:32 PM
I have 3 packages that only get installed if selected. I created 3 Select Install Folder screens, 1 for each package. I have put the following code into the next action of the Select Packages screen and similiar code in the next action portion of the Install Folder screens and get the error "Argument 1 must be of type string" when I click Next. HELP!!

if (SetupData.GetPackageProperties(UserSetup)) then
Screen.Next();
else
if (SetupData.GetPackageProperties(DatabaseSetup)) then
Screen.Jump(InstallDataFiles);
else
if (SetupData.GetPackageProperties(Utilities)) then
Screen.Jump(InstallUtilities);
else
Screen.End();
end
end
end

If UserSetup is the name of a package, you need to put it in quotes, like so:

if (SetupData.GetPackageProperties("UserSetup")) then

If InstallDataFiles is the name of your screen, you need to put the name in quotes as well.

GetPackageProperties also returns a table...if you're wanting to determine whether the "UserSetup" package will be installed, use this code instead:

if (SetupData.GetPackageProperties("UserSetup").Install) then