Archive: Strange Error: unknown variable/constant "{UNSEC0000}" detected


Strange Error: unknown variable/constant "{UNSEC0000}" detected
When I compile my script, at the very end it says:

4 warnings:
unknown variable/constant "{UNSEC0000}" detected, ignoring (macro:SelectSection:3)
unknown variable/constant "{UNSEC0000}" detected, ignoring (macro:SelectSection:5)
unknown variable/constant "{UNSEC0000}" detected, ignoring (macro:UnselectSection:3)
unknown variable/constant "{UNSEC0000}" detected, ignoring (macro:UnselectSection:5)

What does this mess mean? It doesn't even provide line numbers for reference.

Neither Google nor a forum search for any of the message returned any help.


(macro:UnselectSection:5)

Yes it does, it says in macro "UnSelectSection, line 5"
Same thing for line 3.

And I think you're wrapping them in { } marks when they don't need to be. Here's an example one I use (I found it somewhere on a forum post or something..)


!macro SECOFF sec
SectionSetText ${sec} ""
SectionSetFlags ${sec} 0
!macroend


and you call it with:

!insertmacro SECOFF SECTION01

... or whatever.


You do need to wrap it in { }:
!insertmacro SECOFF ${SECTION01}

Why? Because ${sec} will be "SECTION01" when you need it to be the value of ${SECTION01}

-Stu


For some reason, NSIS was not recognizing a section ID declaration for my uninstall section. So I just removed it and made one uninstall section for uninstalling everything.

Thanks!


I'm guessing you hadn't put that Section above where you were using it in your script and so the constant hadn't been defined yet.

-Stu