• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[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

https://www.hiveworkshop.com/forums/jass-resources-412/snippet-multiboard-210232/
 
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.
Back
Top