Archive: Call function_name|:label_name HELP ME!!!!!


Call function_name|:label_name HELP ME!!!!!
Is there anything wrong with this line:

Call validateAll|:notExists

There is a function called validateAll and a label inside called notExists, so why won't it let me jump there?

It gets to here:
Processed 1 file, writing output:

Then dumps this on me:
Processed 1 file, writing output:
Error: resolving install function "validateAll | :notExists" in section "Temporary" <0>
Note: uninstall functions must begin with "un.", and install functions must not
Error - aborting creation process

Can anyone help?

Incidentally, go here for the definitive guide to copying CDs:
http://www.xeikondesign.com/xfx/?page=free


Do you make this Call in the uninstall section? If in the uninstall section, Call can only be used with function names beginning with "un."

~ Florian


I can't get it to work either. I don't believe the instructions are very clear (or maybe not correct) on how to call functions with labels.


I didn't even know this sort of thing could be done. Where is it in the documentation?


You could find it at http://www.firehose.net/free/nsis/makensis.htm#Call

But I think there is a small misunderstanding how this function works. I think the intention is to make calls to labels, execute the commands after the label and then execute the commands after the call to the label. Here is a small example script:

Name "Test"
OutFile "Test-Setup.exe"

Section "Test"
Call testIt
SectionEnd

Function testit
Call :lblTest
MessageBox MB_OK "before label"
lblTest:
MessageBox MB_OK "at label"
FunctionEnd


We call the function testIt, then we call the label lblTest and we are "at label", then we are "before label" and then we are "at label" again.

The '|' in the docu means that we could either use a Call to a function OR a Call to a label within that function - but not a Call to a label in a fuction from outside this function.

~ Florian

Well I got round it by duplicating the function and deleting the bits I didn't want:)