Archive: Compler error I do not understand


Compler error I do not understand
Hello,

I have a function with the following code:

Function OnMonitorClick
Pop $0 # HWND

..... some code

; Select the Monitor section
!insertmacro SelectSection ${Monitor}

.... some code

FunctionEnd

and section like this

Section "Monitor" Monitor

SetOutPath "$INSTDIR"

; These are the deployed files
File ..\..\..\Monitor\deploy\Monitor.exe

... some code


but the compiler gives me an error message:

unknown variable/constant "{Monitor}" detected, ignoring (macro:UnselectSection:4)

any ideas why?

Thanks.


Define OnMonitorClick after you define the section as ${Monitor} will only be defined once the section is defined.