Old 9th December 2008, 08:20   #1
RBIBBY
Junior Member
 
Join Date: Oct 2008
Posts: 8
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.
RBIBBY is offline   Reply With Quote
Old 9th December 2008, 09:33   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Define OnMonitorClick after you define the section as ${Monitor} will only be defined once the section is defined.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump