title: Identifier expected in const
body: <p>I am having problems calling the StringChangeEx function which is replacing parts of a file path such as...</p>
  
  <p><strong>THIS:</strong> C:\Program Files (x86)\Steam\SteamApps\common\Stalker Call of Pripyat\bin<br>
  <strong>TO:</strong> C:\Program Files (x86)\Steam\SteamApps\common\Stalker Call of Pripyat_mm2\bin</p>
  
  <p>As a way of backing up files before replacing them while maintaining it's original file structure.</p>
  
  <p><a href="http://www.jrsoftware.org/ishelp/index.php?topic=isxfunc_stringchangeex" rel="nofollow">http://www.jrsoftware.org/ishelp/index.php?topic=isxfunc_stringchangeex</a></p>
  
  <pre><code>#define Name "Misery Mod"
  #define Description "Misery Mod Installer"
  #define Version "2.0"
  #define Author "Misery Mod Development Team"
  #define Website "http://miserymod.com"
  #define Support "support@miserymod.com"
  #define Copyright "Copyright [c] 2013 Misery Mod. All Rights Reserved."
  #define Executable "Stalker-COP.exe"
  
  [Setup]
  AppId={{6423E48F-04F4-4E99-9420-FDD9165A6A90}
  AppName={#Name}
  AppVersion={#Version}
  AppVerName={#Name} {#Version}
  AppPublisher={#Author}
  AppPublisherURL={#Website}
  AppSupportURL={#Website}
  AppUpdatesURL={#Website}
  AppContact={#Support}
  AppComments={#Description}
  AppCopyright={#Copyright}
  
  DefaultDirName={code:DetectIP}
  DirExistsWarning=no
  OutputDir=debug
  OutputBaseFilename=mm2-installer
  
  Compression=lzma2/ultra64
  SolidCompression=yes
  InternalCompressLevel=ultra
  CompressionThreads=2
  
  VersionInfoVersion={#Version}
  VersionInfoCompany={#Author}
  VersionInfoDescription={#Description}
  VersionInfoTextVersion={#Name} {#Version}
  VersionInfoCopyright={#Copyright}
  VersionInfoProductName={#Name}
  VersionInfoProductVersion={#Version}
  VersionInfoProductTextVersion={#Name} {#Version}
  
  DiskSpanning=True
  DiskSliceSize=1566000000
  SlicesPerDisk=1
  
  MinVersion=0,5.01
  SetupIconFile=mm2.ico
  UninstallDisplayIcon={uninstallexe}
  ShowTasksTreeLines=True
  AlwaysShowGroupOnReadyPage=True
  AlwaysShowDirOnReadyPage=True
  LicenseFile=agreement.rtf
  WizardImageFile=mm2-sidebar.bmp
  WizardSmallImageFile=mm2-header.bmp
  AllowCancelDuringInstall=False
  DisableProgramGroupPage=yes
  UninstallDisplayName={#Name}
  InfoBeforeFile=C:\Users\Nathaniel\Desktop\MM2\readme.rtf
  
  [Run]
  Filename: {app}\{#Executable}; Description: {cm:LaunchProgram, {#Name}}; Flags: nowait postinstall skipifsilent unchecked
  Filename: {#Website}; Description: {cm:VisitWebsite, {#Name}}; Flags: nowait shellexec postinstall skipifsilent unchecked
  
  [CustomMessages]
  LaunchProgram=Enter the Wasteland.
  VisitWebsite=Visit {#Website}.
  
  [Languages]
  Name: "English"; MessagesFile: "compiler:Default.isl"
  Name: "Ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"
  
  [Dirs]
  Name: "{app}\_mm2"
  
  [Files]
  Source: "files\bin\*"; DestDir: {app}; Flags: ignoreversion createallsubdirs recursesubdirs; BeforeInstall: BackupFile
  
  [Code]
  var Base:String;
  var Backup:String;
  
  function DetectIP(Path:String): string;
  
  var Steam:String;
  var Retail:String;
  
  Begin
  
      const Base=ExpandConstant('{pf}')+'\'; // &lt;- Identifier expected.
  
      Steam:=ExpandConstant('{pf}')+'\Steam\SteamApps\common\Stalker Call of Pripyat';
      Retail:=ExpandConstant('{pf}')+'\Steam\SteamApps\common\Stalker Call of Pripyat';
  
      Begin
          if DirExists(Steam) then
              Base:=Steam;
      End;
  
      Begin
          if DirExists(Retail) then
              Base:=Retail;
      End;
  
      Result:=Base;
  
  End;
  
  procedure BackupFile();
  
  var Folder:String;
  var File:String;
  
  Begin
  
      Folder:=ExpandConstant(ExtractFilePath(CurrentFileName));
      File:=ExpandConstant(CurrentFileName);
      Backup:=StringChangeEx(Folder, Base, Base+'_mm2/', false);
  
      MsgBox(Backup, mbInformation, MB_OK);
  
      Begin
          if not DirExists(Backup) then
              CreateDir(Backup);
      End;
  
  End;
  </code></pre>
  
  <blockquote>
    <p>Compiler Error!<br>
    Line 89: Column 5: Identifier expected.</p>
  </blockquote>