Snippet Stack Safety (Pack)

Bribe

vJass errors are legion
Reaction score
67
Unfortunately, this snippet is now outdated thanks to Status.
> Ah, that makes sense

Also, I don't think you used AIDS correctly in your snippet (you need to use: [ljass]//! runtextmacro AIDS()[/ljass])
> Won't hooking the onEnter command suffice? I don't think this needs the whole textmacro; just wanted to catch the units as they come through :-j

But a good idea turning four libraries into one. :)
> Aye, consolidation, one of my favorite things about programming ;) Thanks
 

Kenny

Back for now.
Reaction score
202
Won't hooking the onEnter command suffice? I don't think this needs the whole textmacro; just wanted to catch the units as they come through :-j

That's what [ljass]AIDS_onCreate()[/ljass] is for.

JASS:
private struct UnitData extends array
    //! runtextmacro AIDS()

    integer pauseSize
    integer showSize
    integer invulSize
    integer pathSize
        
    private method AIDS_onCreate takes nothing returns nothing
        set this.pauseSize = 0
        set this.showSize = 0
        set this.invulSize = 0
        set this.pathSize = 0
    endmethod
        
endstruct


I'm pretty sure that does the same thing as you were trying to do with your struct.
 

Bribe

vJass errors are legion
Reaction score
67
But with 70 lines of textmacro code instead of 3 hand-typed :O

And what's more, putting the AIDS textmacro at the top of the struct like everyone does will generate lots of text during map compilation (generated method caller/executor for AIDS_onCreate) :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top