Why Won my multiboard Work???

S

SoCal_420

Guest
ok in my game i got a wieght system. its supposed to show in the multiboard but it wont show. it jus says 0. n e one know y?

Heres my character selection
Code:
Pick Hero
    Events
        Unit - A unit Sells a unit
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Sold unit)) Equal to |c000080FFNecromancer|r
            Then - Actions
                Player - Set (Owner of (Buying unit)) Food used to 1
                Unit - Move (Sold unit) instantly to (Center of Region 000 <gen>)
               [COLOR="Red"] Set CharacterWeight[(Player number of (Owner of (Buying unit)))] = 89[/COLOR]
                Unit - Remove (Buying unit) from the game
                Selection - Select (Sold unit) for (Owner of (Buying unit))
                Camera - Pan camera for (Owner of (Buying unit)) to (Position of (Sold unit)) over 0.00 seconds
                Set Player_Hero_Array[(Player number of (Owner of (Buying unit)))] = (Sold unit)
            Else - Actions

This trigger starts the board
JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    local integer c = 0

    loop
        exitwhen c &gt; 11
        if GetLocalPlayer() == Player(c) then
            set udg_Multi[c] = CreateMultiboard()
            call MultiboardDisplay(udg_Multi[c],true)
            call MultiboardSetTitleText( udg_Multi[c], &quot;TRIGSTR_274&quot; )
            call MultiboardSetColumnCount( udg_Multi[c], 2 )
            call MultiboardSetRowCount( udg_Multi[c], 1 )
            call MultiboardSetItemWidthBJ( udg_Multi[c], 1, 1, 8.00 )
            call MultiboardSetItemWidthBJ( udg_Multi[c], 2, 1, 8.00 )
            call MultiboardSetItemValueBJ( udg_Multi[c], 1, 1, &quot;TRIGSTR_283&quot; )
            call MultiboardSetItemStyleBJ( udg_Multi[c], 2, 1, true, false )
            call MultiboardSetItemStyleBJ( udg_Multi[c], 2, 1, true, false )
            <span style="color: red">call MultiboardSetItemValueBJ( udg_Multi[c], 2, 1, I2S(udg_CharacterWeight[c]) )</span>
        endif
        set c = c + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Multiboards takes nothing returns nothing
    set gg_trg_Multiboards = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Multiboards, 1.00 )
    call TriggerAddAction( gg_trg_Multiboards, function Trig_Untitled_Trigger_002_Actions )
endfunction


This trigger updates the board
JASS:
function Trig_Multiboards_copy_Actions takes nothing returns nothing
    local integer c = 0

    loop
        exitwhen c &gt; 11
        if GetLocalPlayer() == Player(c) then
            
            call MultiboardSetItemStyleBJ( udg_Multi[c], 1, 1, true, false )
            
            call MultiboardDisplay(udg_Multi[c],true)
            call MultiboardSetTitleText( udg_Multi[c], &quot;TRIGSTR_274&quot; )
            call MultiboardSetColumnCount( udg_Multi[c], 2 )
            call MultiboardSetRowCount( udg_Multi[c], 1 )
            
            call MultiboardSetItemValueBJ( udg_Multi[c], 1, 1, &quot;TRIGSTR_283&quot; )
            
            <span style="color: red">call MultiboardSetItemValueBJ( udg_Multi[c], 2, 1, I2S(udg_CharacterWeight[c]) )</span>
        endif
        set c = c + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Multiboards_Copy takes nothing returns nothing
    set gg_trg_Multiboards_Copy = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Multiboards_Copy, 1.10 )
    call TriggerAddAction( gg_trg_Multiboards_Copy, function Trig_Multiboards_copy_Actions )
endfunction
 
so i would have to make this into jass?
Code:
.
Set CharacterWeight[(Player number of (Owner of (Buying unit)))] = 89

.
 
ok thanx but i gotta nother question. people said my mutliboard would desync or somtin . how would i change that
Create
JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    local integer c = 0

    loop
        exitwhen c &gt; 11
        if GetLocalPlayer() == Player(c) then
            set udg_Multi[c] = CreateMultiboard()
            call MultiboardDisplay(udg_Multi[c],true)
            call MultiboardSetTitleText( udg_Multi[c], &quot;TRIGSTR_274&quot; )
            call MultiboardSetColumnCount( udg_Multi[c], 2 )
            call MultiboardSetRowCount( udg_Multi[c], 1 )
            call MultiboardSetItemWidthBJ( udg_Multi[c], 1, 1, 8.00 )
            call MultiboardSetItemWidthBJ( udg_Multi[c], 2, 1, 8.00 )
            call MultiboardSetItemValueBJ( udg_Multi[c], 1, 1, &quot;TRIGSTR_283&quot; )
            call MultiboardSetItemStyleBJ( udg_Multi[c], 2, 1, true, false )
            call MultiboardSetItemStyleBJ( udg_Multi[c], 2, 1, true, false )
            call MultiboardSetItemValueBJ( udg_Multi[c], 2, 1, I2S(udg_CharacterWeight[c]) )
        endif
        set c = c + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Multiboards takes nothing returns nothing
    set gg_trg_Multiboards = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Multiboards, 1.00 )
    call TriggerAddAction( gg_trg_Multiboards, function Trig_Untitled_Trigger_002_Actions )
endfunction



Update
JASS:
function Trig_Multiboards_copy_Actions takes nothing returns nothing
    local integer c = 0

    loop
        exitwhen c &gt; 11
        if GetLocalPlayer() == Player(c) then
            
            call MultiboardSetItemStyleBJ( udg_Multi[c], 1, 1, true, false )
            
            call MultiboardDisplay(udg_Multi[c],true)
            call MultiboardSetTitleText( udg_Multi[c], &quot;TRIGSTR_274&quot; )
            call MultiboardSetColumnCount( udg_Multi[c], 2 )
            call MultiboardSetRowCount( udg_Multi[c], 1 )
            
            call MultiboardSetItemValueBJ( udg_Multi[c], 1, 1, &quot;TRIGSTR_283&quot; )
            call MultiboardSetItemValueBJ( udg_Multi[c], 2, 1, I2S(udg_CharacterWeight[c]) )
            call MultiboardSetItemValueBJ( udg_Multi[c], 2, 1, I2S(udg_CharacterWeight[c]) )
        endif
        set c = c + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Multiboards_Copy takes nothing returns nothing
    set gg_trg_Multiboards_Copy = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Multiboards_Copy, 1.10 )
    call TriggerAddAction( gg_trg_Multiboards_Copy, function Trig_Multiboards_copy_Actions )
endfunction


Would it be the -,+ thing
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top