Page 1 of 1

ERROR LABEL statements cannot be nested inside loops/cond...

Posted: Wed Nov 15, 2006 10:44 am
by Ton_B
I'm trying to mak a patch for my older setup.
Simply by adding the old exe to the patch-reference and add a new file into the file-list.

Then, click on 'build patch' I constantly get the error:
"LABEL statements cannot be nested inside loops/conditionals"

I really have no clue on what is wrong with my code, bacause creating a normal build this message is not shown!?

here's a snippet from my code:
After, the message the label "Maintenance" is selected.

Code: Select all

if Variable SILENTMODE not Equals TRUE
  wizard loop
    Display Dialog: welcome, wait for dialog to return (modal)
    [compiler if Variable BUILDMODE not Equals PATCH]
    Display Dialog: destination, wait for dialog to return (modal)
    [compiler end]
    Display Dialog: startinstallation, wait for dialog to return (modal)
  end
end
 
GoTo Label: Main Install
 
<<Code Folding Region>>
 
[DEFINE REGION: Process (Un)Installation]
label: Maintenance
Comment: Maintenance Install/Uninstall
Set Variable UNINSTALL to YES
MessageBox: $TITLE$ Uninstall, Are you sure you want to uninstall the selected application and all of its components?
if Variable UNINSTALL Equals NO
  Terminate Installation
  else
  Set Variable REMOVE to TRUE
end
<<Code Folding Region>>
[DEFINE REGION: main installation]
 
label: Main Install
Comment: Exit Setup if Wizard Loop cancelled
if Variable WIZARD Equals CANCEL
etc.etc.


Hope someone has the answer!

Ton.

p.s. if more code is required, please tell me. i will post it!

Posted: Wed Nov 15, 2006 12:35 pm
by MichaelNesmith
The compiler variable If/Else/End statements probably got messed up, leading to incorrect inclusions/exclusions, so there is an unclosed If...End block statement somewhere. Reviewing your MSIcode should help spot the error.