Error on line

Nexor

...
Reaction score
74
Jasshelper says for this, that Plague[hero] isn't an array, but I'm running PUI in the struct, there should be no error :S

JASS:
private struct Plague
    unit hero
    integer ticks
    
    static method create takes unit u returns thistype
        local thistype this = thistype.allocate()
        set .hero = u
        return this
    endmethod
    
    //!runtextmacro PUI()
endstruct

private function LearnActions takes nothing returns nothing
    local unit hero = GetTriggerUnit()
    local integer index = GetUnitIndex(hero)
    
    if Plague[hero] == 0 then  //This line is the one jasshelper doesn't like
        set Plague[hero] = Plague(Plague[index]).create(hero)
    endif
endfunction
 

Nexor

...
Reaction score
74
LOL, I just copied the runtextmacro for PUI from another trigger and it seems that:

JASS:
//!runtextmacro PUI() != //! runtextmacro PUI()


Only one space can make things crazy :S

Sorry for doubleposting!

Problem solved!
 
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