Something's wrong with my map's Multiboard System code in vJASS!!??

Status
Not open for further replies.
Here's the code:

JASS:
library MB initializer 
    globals
        multiboard array MB
        private string MBtitle
        private constant string LeftColor = "|cff080808"
        private constant string KillsColor = "|cffff0000"
        private constant string DeathsColor = "|cff0036ff"
        private constant integer Cols = 3
        private constant integer Rows = CountPlayersInForceBJ(GetPlayersAll()) + 4
        private integer Tempint
        private integer int
        constant string Name1 = "|cffffcc00The|r |cff1e90ffS|r|cffffff00anctified|r"
        constant string Name2 = "|cffffcc00The|r |cff228b22O|r|cff363636minous|r"
    endglobals

    private function MBS takes nothing returns nothing

        set MBtitle = I2S(udg_PlayerScores[int]) + "/" + I2S(udg_PlayerDeaths[int])+ " - |cffffcc00T|r|cffff0000he|r |cffffcc00D|r|cffff0000emigod|r |cffffcc00A|r|cffff0000rena|r"
        
        MultiboardSetTitleText(MB[int], MBtitle)
        MultiboardSetColumnCount(MB[int], Cols)
        MultiboardSetRowCount(MB[int], Rows)
    endfunction
    
    //======================================================================
    //
    //                         Player 1 Function
    //
    //======================================================================
    
    private function P1 takes string p1n, playerslotstate p1 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p1 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p1n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[1]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[1]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[1] + p1n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[1]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[1]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 2 Function
    //
    //======================================================================
    
    private function P2 takes string p2n, playerslotstate p2 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p2 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p2n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[2]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[2]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[2] + p2n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[2]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[2]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 3 Function
    //
    //======================================================================
    
    private function P3 takes string p3n, playerslotstate p3 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p3 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p3n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[3]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[3]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[3] + p3n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[3]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[3]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 4 Function
    //
    //======================================================================
    
    private function P4 takes string p4n, playerslotstate p4 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
        
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
        
        if p4 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p4n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[4]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[4]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[4] + p4n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[4]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[4]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 5 Function
    //
    //======================================================================
    
    private function P5 takes string p5n, playerslotstate p5 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p5 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p5n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[5]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[5]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[5] + p5n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[5]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[5]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 6 Function
    //
    //======================================================================
    
    private function P6 takes string p6n, playerslotstate p6 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p6 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p6n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[6]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[6]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[6] + p6n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[6]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[6]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 7 Function
    //
    //======================================================================
    
    private function P7 takes string p7n, playerslotstate p7 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p7 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p7n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[7]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[7]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[7] + p7n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[7]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[7]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 8 Function
    //
    //======================================================================
    
    private function P8 takes string p8n, playerslotstate p8 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p8 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p8n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[8]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[8]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[8] + p8n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[8]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[8]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 9 Function
    //
    //======================================================================
    
    private function P9 takes string p9n, playerslotstate p9 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p9 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p9n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[9]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[9]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[9] + p9n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[9]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[9]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                         Player 10 Function
    //
    //======================================================================
    
    private function P10 takes string p10n, playerslotstate p10 returns nothing
        local multiboarditem mbi1
        local multiboarditem mbi2
        local multiboarditem mbi3
        
        set Tempint = Tempint + 1
                
        set mbi1 = MultiboardGetItem(MB[int], Tempint, 1)
        set mbi2 = MultiboardGetItem(MB[int], Tempint, 2)
        set mbi3 = MultiboardGetItem(MB[int], Tempint, 3)
                
        if p10 == left then
            call MultiboardSetItemValue(mbi1, LeftColor + p10n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[10]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[10]) + "|r")
        else
            call MultiboardSetItemValue(mbi1, udg_PlayerColors[10] + p10n + "|r")
            call MultiboardSetItemValue(mbi2, KillsColor + I2S(udg_PlayerScores[10]) + "|r")
            call MultiboardSetItemValue(mbi3, DeathsColor + I2S(udg_PlayerDeaths[10]) + "|r")
        endif
    endfunction
    
    //======================================================================
    //
    //                        Create Multiboard
    //
    //======================================================================
    
    private function MB takes nothing returns nothing
        local string p1n = GetPlayerName(Player(0))
        local string p2n = GetPlayerName(Player(1))
        local string p3n = GetPlayerName(Player(2))
        local string p4n = GetPlayerName(Player(3))
        local string p5n = GetPlayerName(Player(4))
        local string p6n = GetPlayerName(Player(5))
        local string p7n = GetPlayerName(Player(6))
        local string p8n = GetPlayerName(Player(7))
        lcoal string p9n = GetPlayerName(Player(8))
        local string p10n = GetPlayerName(Player(9))
        local playerslotstate p1 = GetPlayerSlotState(Player(0))
        local playerslotstate p2 = GetPlayerSlotState(Player(1))
        local playerslotstate p3 = GetPlayerSlotState(Player(2))
        local playerslotstate p4 = GetPlayerSlotState(Player(3))
        local playerslotstate p5 = GetPlayerSlotState(Player(4))
        local playerslotstate p6 = GetPlayerSlotState(Player(5))
        local playerslotstate p7 = GetPlayerSlotState(Player(6))
        local playerslotstate p8 = GetPlayerSlotState(Player(7))
        local playerslotstate p9 = GetPlayerSlotState(Player(8))
        local playerslotstate p10 = GetPlayerSlotState(Player(9))
        local playerslotstate playing = PLAYER_SLOT_STATE_PLAYING
        local playerslotstate left = PLAYER_SLOT_STATE_LEFT
        local multiboarditem tmbi
        
        set int = 0
        
        loop
            //======================================================================
            //                      Fixing Up Multiboard
            //======================================================================
            exitwhen int > 10
            
            set int = int + 1
            
            set MB[int] = CreateMultiboard()
        
            call MBS()
        
            set tmbi = MultiboardGetItem(MB[int], 1, 1)
            call MultiboardSetItemValue(tmbi, "|cffffcc00Demigods|r")
        
            set tmbi = MultiboardGetItem(MB[int], 2, 1)
            call MultiboardSetItemValue(tmbi, KillsColor + "K|r")
        
            set tmbi = MultiboardGetItem(MB[int], 3, 1)
            call MultiboardSetItemValue(tmbi, DeathsColor + "D|r")
        
            set tmbi = MultiboardGetItem(MB[int], 1, 2)
            call MultiboardSetItemValue(tmbi, Name1)
        
            set tmbi = MultiboardGetItem(MB[int], 2, 2)
            call MultiboardSetItemValue(tmbi, KillsColor + I2S(udg_TeamScores[1]) + "|r")
        
            set tmbi = MultiboardGetItem(MB[int], 3, 2)
            call MultiboardSetItemValue(tmbi, DeathsColor + I2S(udg_TeamDeaths[1]) + "|r")
        
            set Tempint = 2
        
            //======================================================================
            //
            //                             Players 1-5
            //
            //======================================================================
        
            if p1 == playing Or p1 == left then
                call P1(p1n, p1)
                if p2 == playing Or p2 == left then
                    call P2(p2n, p2)
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                else
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                endif
            else
                if p2 == playing Or p2 == left then
                    call P2(p2n, p2)
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                else
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                endif
            endif
        
            //======================================================================
            //                   Set Variables for next loop
            //======================================================================
        
            set Tempint = Tempint + 2
        
            set tmbi = MultiboardGetItem(MB[int], Tempint, 1)
            call MultiboardSetItemValue(tmbi, Name2)
        
            set tmbi = MultiboardGetItem(MB[int], Tempint, 2)
            call MultiboardSetItemValue(tmbi, KillsColor + I2S(udg_TeamScores[2]) + "|r")
        
            set tmbi = MultiboardGetItem(MB[int], Tempint, 3)
            call MultiboardSetItemValue(tmbi, DeathsColor + I2S(udg_TeamDeaths[2]) + "|r")
        
            //======================================================================
            //
            //                           Players 6-10
            //
            //======================================================================
        
            if p6 == playing Or p6 == left then
                call P6(p6n, p6)
                if p7 == playing Or p7 == left then
                    call P7(p7n, p7)
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                else
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                endif
            else
                if p7 == playing Or p7 == left then
                    call P7(p7n, p7)
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                else
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                endif
            endif
        
            set tmbi = MultiboardGetItem(MB[int], 0, 0)
            call MultiboardSetItemStyle(tmbi, true, false)
    
            set tmbi = MultiboardGetItem(MB[int], 0, 0)
            call MultiboardSetItemWidth(tmbi, 3.00)
    
            set tmbi = MultiboardGetItem(MB[int], 0, 1)
            call MultiboardSetItemWidth(tmbi, 12.25)
            
            if GetLocalPlayer() == Player(int-1) then
                call MultiboardDisplay(MB[int], true)
            endif
        endloop
    endfunction
    
    private function MBU takes nothing returns nothing
        set MBtitle = I2S(udg_PlayerScores[int]) + "/" + I2S(udg_PlayerDeaths[int])+ " - |cffffcc00T|r|cffff0000he|r |cffffcc00D|r|cffff0000emigod|r |cffffcc00A|r|cffff0000rena|r"
        MultiboardSetTitleText(MB[int], MBtitle)
    endfunction
    
    function UpdateMB takes nothing returns nothing
        local string p1n = GetPlayerName(Player(0))
        local string p2n = GetPlayerName(Player(1))
        local string p3n = GetPlayerName(Player(2))
        local string p4n = GetPlayerName(Player(3))
        local string p5n = GetPlayerName(Player(4))
        local string p6n = GetPlayerName(Player(5))
        local string p7n = GetPlayerName(Player(6))
        local string p8n = GetPlayerName(Player(7))
        lcoal string p9n = GetPlayerName(Player(8))
        local string p10n = GetPlayerName(Player(9))
        local playerslotstate p1 = GetPlayerSlotState(Player(0))
        local playerslotstate p2 = GetPlayerSlotState(Player(1))
        local playerslotstate p3 = GetPlayerSlotState(Player(2))
        local playerslotstate p4 = GetPlayerSlotState(Player(3))
        local playerslotstate p5 = GetPlayerSlotState(Player(4))
        local playerslotstate p6 = GetPlayerSlotState(Player(5))
        local playerslotstate p7 = GetPlayerSlotState(Player(6))
        local playerslotstate p8 = GetPlayerSlotState(Player(7))
        local playerslotstate p9 = GetPlayerSlotState(Player(8))
        local playerslotstate p10 = GetPlayerSlotState(Player(9))
        local playerslotstate playing = PLAYER_SLOT_STATE_PLAYING
        local playerslotstate left = PLAYER_SLOT_STATE_LEFT
        local multiboarditem tmbi
        
        set int = 0
        
        loop
            //======================================================================
            //                      Fixing Up Multiboard
            //======================================================================
            exitwhen int > 10
            
            set int = int + 1
        
            call MBU()
            
            //Total Team Kills
            
            set udg_TeamScores[1] = udg_PlayerScores[1] + udg_PlayerScores[2] + udg_PlayerScores[3] + udg_PlayerScores[4] + udg_PlayerScores[5]
        
            set tmbi = MultiboardGetItem(MB[int], 2, 2)
            call MultiboardSetItemValue(tmbi, KillsColor + I2S(udg_TeamScores[1]) + "|r")
            
            //Total Team Deaths
            
            set udg_TeamDeaths[1] = udg_PlayerDeaths[1] + udg_PlayerDeaths[2] + udg_PlayerDeaths[3] + udg_PlayerDeaths[4] + udg_PlayerDeaths[5]
        
            set tmbi = MultiboardGetItem(MB[int], 3, 2)
            call MultiboardSetItemValue(tmbi, DeathsColor + I2S(udg_TeamDeaths[1]) + "|r")
        
            set Tempint = 2
        
            //======================================================================
            //
            //                             Players 1-5
            //
            //======================================================================
        
            if p1 == playing Or p1 == left then
                call P1(p1n, p1)
                if p2 == playing Or p2 == left then
                    call P2(p2n, p2)
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                else
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                endif
            else
                if p2 == playing Or p2 == left then
                    call P2(p2n, p2)
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                else
                    if p3 == playing Or p3 == left then
                        call P3(p3n, p3)
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    else
                        if p4 == playing Or p4 == left then
                            call P4(p4n, p4)
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        else
                            if p5 == playing Or p5 == left then
                                call P5(p5n, p5)
                            endif
                        endif
                    endif
                endif
            endif
        
            //======================================================================
            //                   Set Variables for next loop
            //======================================================================
        
            set Tempint = Tempint + 2
            
            set udg_TeamScores[2] = udg_PlayerScores[6] + udg_PlayerScores[7] + udg_PlayerScores[8] + udg_PlayerScores[9] + udg_PlayerScores[10]
        
            set tmbi = MultiboardGetItem(MB[int], Tempint, 2)
            call MultiboardSetItemValue(tmbi, KillsColor + I2S(udg_TeamScores[2]) + "|r")
            
            set udg_TeamDeaths[2] = udg_PlayerDeaths[6] + udg_PlayerDeaths[7] + udg_PlayerDeaths[8] + udg_PlayerDeaths[9] + udg_PlayerDeaths[10]
        
            set tmbi = MultiboardGetItem(MB[int], Tempint, 3)
            call MultiboardSetItemValue(tmbi, DeathsColor + I2S(udg_TeamDeaths[2]) + "|r")
        
            //======================================================================
            //
            //                           Players 6-10
            //
            //======================================================================
            
            if p6 == playing Or p6 == left then
                call P6(p6n, p6)
                if p7 == playing Or p7 == left then
                    call P7(p7n, p7)
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                else
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                endif
            else
                if p7 == playing Or p7 == left then
                    call P7(p7n, p7)
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                else
                    if p8 == playing Or p8 == left then
                        call P8(p8n, p8)
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    else
                        if p9 == playing Or p9 == left then
                            call P9(p9n, p9)
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        else
                            if p10 == playing Or p10 == left then
                                call P10(p10n, p10)
                            endif
                        endif
                    endif
                endif
            endif
        endloop
    endfunction
    
    private function InitMB takes nothing returns nothing
        local trigger t
        
        set t = CreateTrigger()
        call TriggerRegisterTimerEventSingle(t, 0.00)
        call TriggerAddAction(t, MB)
        
        set t = null
    endfunction
endlibrary

The Jass helper thingamabob says:

Unable to find prototype: function takes nothing returns *** inside the library.
 
It's actually one of the only ways to make a multiboard system that doesn't leave empty slots.
It was 2500 lines at first, but i figured out a way to reduce it to 950 lines.
I'm still working on it :/

Thanks for the help :)

I guess i must've forgotten about the first line xD LOL

EDIT:
I found a new way to do it in less than 500 lines :D
OMG I'm such an idiot!
WTF was i thinkING????
 
Status
Not open for further replies.
Top