• 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 member (method chaining)

Status
Not open for further replies.
Level 4
Joined
Jan 3, 2012
Messages
60
Is this not allowed? I get error that says: is not a type that allows . syntax

JASS:
library aLib

   struct Slot

      method createSlot takes nothing returns Slot
         //do something
         return this
      endmethod

   endstruct
endlibrary


library bLib requires aLib

   struct Inventory
      aLib_Slot inventory_slot


      method createInventory takes nothing returns nothing
         call this.inventory_slot.createSlot()
      endmethod

   endstruct
endlibrary
 
Status
Not open for further replies.
Top