PDA

View Full Version : Unidentified Identifier? Need help with Code.



Funnyguy77
02-01-2016, 04:48 PM
Alright so I have made some code to get an EULA to appear in an installscript MSI. I have posted the code below.

Dlg_SdLicense2Rtf

szTitle = "";
szOpt1 = "";
szOpt2 = "";

DialogSetInfo(DLG_INFO_ALTIMAGE, SUPPORTDIR ^ "banner.bmp", TRUE) ;
szLicenseFile = SUPPORTDIR ^ "license.rtf";

nResult = SdLicense2Rtf(szTitle, szOpt1, szOpt2, szLicenseFile, bLiceneseAccepted) ;

if (nResult = BACK) then
goto Dlg_SdWelcome;
else
bLicenseAccepted = TRUE;
endif;







But I keep getting errors when I try to build the installer. For example (I have posted the errors below)

Compiling...
Setup.Rul
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(70) : error C8025: 'Dlg_SdLicense2Rtf' : undefined identifier
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(73) : error C8025: 'szOpt1' : undefined identifier
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(74) : error C8025: 'szOpt2' : undefined identifier
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(79) : error C8025: 'szOpt1' : undefined identifier
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(79) : error C8039: 'szOpt1' : string value required
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(79) : error C8025: 'szOpt2' : undefined identifier
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(79) : error C8039: 'szOpt2' : string value required
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(79) : error C8025: 'bLiceneseAccepted' : undefined identifier
C:\InstallShield 2015 Projects\PMAC-DEMO_TEST\Script Files\Setup.Rul(84) : error C8025: 'bLicenseAccepted' : undefined identifier
Setup.inx - 9 error(s), 0 warning(s)


Any help with this would be greatly appreciated!

rguggisberg
02-02-2016, 09:22 AM
You need to define these items just before the BEGIN statement at the beginning of the function. Like this:
STRING szOpt1, szOpt2;
BOOL bLiceneseAccepted;

You need a : after Dlg_SdLicense2Rtf like this:
Dlg_SdLicense2Rtf:

Funnyguy77
02-02-2016, 10:15 AM
You need to define these items just before the BEGIN statement at the beginning of the function. Like this:
STRING szOpt1, szOpt2;
BOOL bLiceneseAccepted;

You need a : after Dlg_SdLicense2Rtf like this:
Dlg_SdLicense2Rtf:

Thank you so much! This solved all of my problems!