Menu

#1133 string arguments of !insertmacro can only be quoted by double quote only

3.0 Alpha Series
closed-wont-fix
nobody
PP (1)
5
2016-11-24
2016-01-08
Dr. Geek
No

Version of NSIS: 3.0b3
Error Message:

!insertmacro: macro "LogTextCall" requires 1 parameter(s), passed 2!

Script that caused the error:

OutFile "test.exe"
; This so the log will be written to same dir as the test file.
; NOT recommended for actual installation files.
InstallDir "$EXEDIR"

Page custom OnCustom AfterCustom
Page components
Page instfiles
Page custom ShowLog

!define Log '!insertmacro LogTextCall'
!macro LogTextCall _text
LogText "${_text}"
!macroend

Section one
${Log} 'In Section "One"'
SectionEnd

Discussion

  • Anders

    Anders - 2016-01-14

    Are you sure you pasted the correct error message? It should read "LogText expects 1 parameters, got 2."

    The problem is that ${Log} 'In Section "One"' expands to LogText "In Section "One"".

    You can use ${Log} 'In Section $\"One$\"' or use one of the other two quote characters in the LogTextCall macro.

     
  • Anders

    Anders - 2016-11-24
    • labels: --> PP
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,8 +4,8 @@
    
     Script that caused the error:
     > OutFile "test.exe"
    -> # This so the log will be written to same dir as the test file. 
    -> # NOT recommended for actual installation files.
    +> ; This so the log will be written to same dir as the test file. 
    +> ; NOT recommended for actual installation files.
     > InstallDir "$EXEDIR"  
     > 
     > Page custom OnCustom AfterCustom
    
    • status: open --> closed-wont-fix
     

Log in to post a comment.

Auth0 Logo