• 🏆 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!

[JASS] Multiboard doesn't work

Status
Not open for further replies.
Level 1
Joined
Jun 14, 2010
Messages
2
I've created multiboard. Unfortunately it works wrong: width not changing, and icons in first row and first column aren't hide. What i've done wrong?
Code:
function MbSetStyle takes multiboard mb, integer row, integer col returns nothing
call MultiboardSetItemStyle(MultiboardGetItem(mb, row , col ), true, false)
call MultiboardReleaseItem(MultiboardGetItem(mb, row , col ))
endfunction

function Trig_MultiboardStandart_Actions takes nothing returns nothing
    // multiboard
    local multiboarditem mbi= null
    local force f = CreateForce()
    local integer a = 1
    local integer b = 1
    call ForceEnumPlayers(f, Condition(function Trig_MultiboardStandart_Func002002001001001))
    set udg_board = CreateMultiboard()
    call MultiboardSetRowCount(udg_board, CountPlayersInForceBJ(f)+2)
    call MultiboardSetColumnCount(udg_board, 5)
    call MultiboardSetTitleText(udg_board, "TRIGSTR_162")
    call MultiboardDisplay(udg_board, true)
   
    loop
        exitwhen a > 5
       set b = 1
        loop
             exitwhen b > MultiboardGetRowCount(udg_board)
            call MbSetStyle(udg_board,b,a)
            
            if a==2 then
            set mbi = MultiboardGetItem(udg_board,b,a)
                call MultiboardSetItemWidth( mbi, 0.08 )
           
            endif
            if a==3 then
            set mbi = MultiboardGetItem(udg_board,b,a)
                call MultiboardSetItemWidth( mbi, 0.021 )
            
            endif
            if a==4 then
                set mbi = MultiboardGetItem(udg_board,b,a)
                call MultiboardSetItemWidth( mbi, 0.0380 )
           
            endif
            if a==5 then
             
                set mbi = MultiboardGetItem(udg_board,b,a)
                call MultiboardSetItemWidth( mbi, 0.0450 )
            else
            endif
            if a==6 then
                     
                set mbi = MultiboardGetItem(udg_board,b,a)
                call MultiboardSetItemWidth( mbi, 0.0250 )
            
            endif
            set b = b + 1
        endloop
        set a = a + 1
    endloop
endfunction
 
Status
Not open for further replies.
Top