• 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.

[vJASS] Struct operator question

Status
Not open for further replies.
Hm... this works

JASS:
struct Tester extends array
    private static method init takes nothing returns nothing
        local Multiboard board = Multiboard.create(2,2)
        
        call board.setStyle(true, false)
        
        set board[0][0].text = "00"
        set board[0][1].text = "01"
        set board[1][0].text = "10"
        set board[1][1].text = "11"
        
        set board.display = true
        
        set board.row.count = 3
        set board[2][0].text = "20"
        set board[2][1].text = "21"
        
        set board.row.count = 2
        set board.row.count = 3
        
        call DestroyTimer(GetExpiredTimer())
    endmethod
    private static method onInit takes nothing returns nothing
        call TimerStart(CreateTimer(),0,false,function thistype.init)
    endmethod
endstruct

From

http://www.hiveworkshop.com/forums/jass-resources-412/snippet-multiboard-210232/
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Not what he was referring to though, the first [] returns a struct that also has a [] operator.

He wants something like

struct[a,b]
 
Status
Not open for further replies.
Top