Old 19th June 2020, 17:00   #1
dracore
Junior Member
 
Join Date: Jun 2020
Posts: 2
Question Logiclib and expression compile error?

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?
dracore is offline   Reply With Quote
Old 19th June 2020, 17:43   #2
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 884
I have really no clue of that but note that you set the brackets differently... ${if} vs. {$if}...
Nitorami is offline   Reply With Quote
Old 19th June 2020, 18:02   #3
dracore
Junior Member
 
Join Date: Jun 2020
Posts: 2
Talking

Quote:
Originally Posted by Nitorami View Post
I have really no clue of that but note that you set the brackets differently... ${if} vs. {$if}...
Omgod I'm such an idiot Stared at this so long that I didn't even see the mistype.
Thanks for that!
dracore is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
error, logiclib

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