Method error

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, there's actually two "errors" there:
JASS:
private struct Data
    unit caster
    trigger t
            
        //method Create takes nothing return Data
        static method create takes nothing returns thistype // The method needs to be static, and also it's called "create" not "Create"
        //and it&#039;s supposed to be &quot;returns&quot; not return and (This isn&#039;t necessary but) changed &quot;Data&quot; to &quot;thistype&quot; as it&#039;s much more convenient <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink    ;)" loading="lazy" data-shortname=";)" />
            local Data d = Data.allocate()
            set d.t = CreateTrigger()
            set d.caster = GetEventDamageSource()
            return d
        endmethod
                
endstruct


That's about it ;)
 
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