• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

struct extends array

Status
Not open for further replies.
Level 12
Joined
Oct 16, 2010
Messages
680
I read a lot about this and i kinda like it , but i have a couple of question because I'm still new in this.

Can i still extend interfaces? if yes tell me how i don't found anything:S
if no what can i do instead of interfaces?

does that I cant give default values to variables means i have to "set" them manually after declaration? Cos i got this compile error

whats the difference between create and allocate? if theres any
 
A struct that extends an array has nothing in it but the syntax, so you have to code everything you want from scratch. This means that allocate is just a method, just like create. However, by vjass standards, we say that allocate will allocate a new instance and that create sets that instance up. A lot of resources just inline the allocate into create.


Interfaces are never used in pro resources. Pro resources either use events or modules.
 
Level 12
Joined
Oct 16, 2010
Messages
680
i saw how to make modules, but i have a question about

so e.g.

JASS:
module modulename
     method something takes nothing returns nothing
           //script a
     endmethod
endmodule

JASS:
struct name
implement modulename

     method something takes nothing returns nothing
           //script b
     endmethod

script a and b will be added together and not overwriting each other right?
by the way how do u work with events?

and what u said means if i want to make a linked list for the struct array
i should use allocate?
or by vjass standards u mean that "create is for setup" is a common thing
 
Last edited:
Status
Not open for further replies.
Top