Old 3rd July 2014, 12:12   #1
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 190
CallArtificialFunction problem

I have the following problem. I have made some special macros, using CallArtificialFunction macro. They work as it is expected. But now I need to make another macro that uses my existing macros and this new macro also uses CallArtificialFunction. I organized the new macro similar to the existing ones. But when I compile the script I get the following message:

!insertmacro: macro "CallArtificialFunction" already being inserted!

... and then follow some errors (I believed caused by this problem).

Probably it is easy, but I don't know how to solve my problem. A little help will be appreciated...
TrifonovS is offline   Reply With Quote
Old 3rd July 2014, 12:49   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,150
Use CallArtificialFunction2

(This macro recursion restriction is silly and there is no reason for it to exist)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 3rd July 2014, 14:36   #3
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 190
Thanks! No more problems...
TrifonovS is offline   Reply With Quote
Old 4th July 2014, 07:19   #4
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 190
And what if I have now a third level? There is no CallArtificialFunction3...
TrifonovS is offline   Reply With Quote
Old 4th July 2014, 10:43   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,150
Quote:
Originally Posted by TrifonovS View Post
And what if I have now a third level? There is no CallArtificialFunction3...
You could make your own. This helper is mostly used by "library" headers and you would normally not need 3 levels of this magic.

I will look into removing this !insertmacro restriction but no promises...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th July 2014, 20:29   #6
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 190
Thanks again!
TrifonovS 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