Struct question

soulreaping

New Member
Reaction score
17
Hey,

Let's say I got this code:
JASS:

struct Hello

    method create takes nothing returns Hello
        local Hello h = Hello.allocate()
        //Some code
        return h
    endmethod
endstruct


Will it work the same this way?
JASS:

struct Hello

    method create takes nothing returns integer
        local Hello h = Hello.allocate()
        //Some code
        return h
    endmethod
endstruct


Thanks!
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Why don't you try it on WorldEditor?
But I assume that 2 of the code will causes error.

It is static method and not [del]method[/del].
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Then let me tell you, No!

Method create must return the specific struct type.
 
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