Invalid command: ${NSD_SetUserData}
I'm using HM NIS Edit 2.0.3
MakeNSIS V2.46
!include "nsDialogs.nsh"
!include "winmessages.nsh"
!include "logiclib.nsh"
OutFile "test.exe"
Page Custom pre post
var dialog
var hwnd
var minor
Function pre
nsDialogs::Create 1018
Pop $dialog
${NSD_CreateRadioButton} 0 0 40% 6% "I am 14 years of age or older"
Pop $hwnd
${NSD_AddStyle} $hwnd ${WS_GROUP}
${NSD_SetUserData} $hwnd "false"
${NSD_OnClick} $hwnd RadioClick
${NSD_CreateRadioButton} 0 12% 40% 6% "I am younger than 14 of age"
Pop $hwnd
${NSD_SetUserData} $hwnd "true"
${NSD_OnClick} $hwnd RadioClick
nsDialogs::Show
FunctionEnd
Function RadioClick
Pop $hwnd
${NSD_GetUserData} $hwnd $minor
FunctionEnd
Function post
${If} $minor == ""
MessageBox MB_OK "Please specify your age group"
Abort
${ElseIf} $minor == true
MessageBox MB_OK "installation will continue with content appropriate for your age"
${Else}
MessageBox MB_OK "installation will continue normally"
${EndIf}
FunctionEnd
Section ""
SectionEnd