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