Nested private scopes and text macros

Reaction score
456
JASS:
library MyLib

//! textmacro TextMacro takes NAME
    private scope $NAME$Scope
    
    endscope
//! endtextmacro

//! runtextmacro TextMacro("First")
//! runtextmacro TextMacro("Second")
//! runtextmacro TextMacro("Third")

endlibrary

This sometimes gives me syntax error, but not always. But when it gives the syntax error, it goes like:
Line XX: Unable to find initializer: [endscope is highlighted]
Line XX: (From this macro instance) [the first text macro run is highlighted]

..
But if I remove the private keyword from the scope, it saves fine in every map.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
It causes a syntax error even without the textmacros. Are you sure you can nest private scopes within libraries, I tested this and it created a syntax error:
JASS:
library Ek

private scope Bleh

endscope

endlibrary


But why do you need a private scope within a library? You can still use private and public prefixes.
 
Reaction score
456
It's possible to nest private scopes. I've tested it, but it does not work on every map.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top