• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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