Page 1 of 1

Patch will not build - label statements cannot be nested

Posted: Thu Apr 02, 2009 10:32 am
by ParallaxiT
I have a project that builds correctly when i click on Web Deploy option. Builds and installs fine. When i add a reference to the previous build and click Build Patch it fails saying that 'Label statements cannot be nested inside loops/conditionals'.

I had this error previously and corrected it to allow the Web Deploy to build correctly so i do not know why it is popping up in the patch. The label it points to is not nested inside any loop or conditional (see screenshot).

Thanks for any help!

Cheers

File Attached:

script.JPG

Posted: Thu Apr 02, 2009 12:26 pm
by MichaelNesmith
Check your compiler variables.

Posted: Thu Apr 02, 2009 12:42 pm
by ParallaxiT
What does that mean?

Posted: Thu Apr 02, 2009 1:57 pm
by MichaelNesmith
Read the patching whitepaper for an explanation, what you need to know is already there.

Posted: Thu Apr 02, 2009 2:19 pm
by ParallaxiT
I understand how the patching works, i had it working up until i put in the logic i posted in my screenshot. Nothing in your patching guide speaks of nested errors etc. Any other places to look.

Posted: Fri Apr 03, 2009 10:17 am
by MichaelNesmith
Then, again, as I have posted before, you need to check your compiler variables, in order to ensure that your script is still consistent when the patch mode is in effect.

Patch will not build - label statements cannot be nested

Posted: Wed Sep 23, 2009 12:11 pm
by dalguy72
I am getting the same error when I try to create a patch. I have created patches before, but this is first time I created custom include scripts. It compiles without complaining, and I can do the installation, I just get the same error as he does : "LABEL statements cannot be nested inside loops/conditional". If I remove the offending label statements from the main msi file, then things like the maintenance if/then statement fails. I can not check the compiler variables, since I am running Installaware developer 8 and it reports that I need the studio version. I need to get this resolved soon, so if either of you have a solution, I would appreciate it. :!:

Posted: Sun Oct 18, 2009 7:24 pm
by BruceMcK
I had the same problem.

I found some of my [compiler if Variable BUILDMODE not Equals PATCH] and matching [compiler end] statements wrapped 'Include Script' calls.

As soon as I moved the 'Include Scripts' out of the If block, I was able to build the patch.

Bruce.