The strangest thing - I can't seem to use the LogicLib expressions (e.g. ${If}etc..) whenever I am in a normal function.
Basically my script is like this (reduced for brevity):
!include "LogicLib.nsh"
Function .onVerifyInstDir
${If} $0 == 0 <<<<<<<< THIS WORKS
${EndIf}
FunctionEnd
Function StopAMCService
${if} $0 == 0 <<<<<<<< THIS WORKS
${endif}
{$If} $0 == 0 <<<<<<<< COMPILE ERROR
{$EndIf}
FunctionEnd
So in the .onVerifyInstDir function, ${If} is ok
In a regular function StopAMCService, lower case ${if} is ok but ${If} is not.
The error I get is:
Invalid command: "{$If}"
I am confused why this is the case. Can someone shed some light?
Basically my script is like this (reduced for brevity):
!include "LogicLib.nsh"
Function .onVerifyInstDir
${If} $0 == 0 <<<<<<<< THIS WORKS
${EndIf}
FunctionEnd
Function StopAMCService
${if} $0 == 0 <<<<<<<< THIS WORKS
${endif}
{$If} $0 == 0 <<<<<<<< COMPILE ERROR
{$EndIf}
FunctionEnd
So in the .onVerifyInstDir function, ${If} is ok
In a regular function StopAMCService, lower case ${if} is ok but ${If} is not.
The error I get is:
Invalid command: "{$If}"
I am confused why this is the case. Can someone shed some light?
Comment