I have problem with this GUI code. I tried to solve my self but i cant fix the common errors.
There is a big list of the errors here. However its not full.http://www.hiveworkshop.com/forums/pastebin.php?id=gr3lyi
The corrected code must create this http://s7.directupload.net/images/121109/3ll4myf7.png
P.S The original triggerer, didn't share the GUI version. So i have only this.
JASS:
function Trig_Multiboard takes nothing returns nothing
call CreateMultiboardBJ(7,16,"Multiboard")
set udg_Multiboard=bj_lastCreatedMultiboard
call MultiboardSetTitleTextColorBJ(udg_Multiboard,'d',10.,10.,0)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=16
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemWidthBJ(udg_Multiboard,1,bj_forLoopAIndex,8.)
call MultiboardSetItemWidthBJ(udg_Multiboard,2,bj_forLoopAIndex,10.)
call MultiboardSetItemWidthBJ(udg_Multiboard,3,bj_forLoopAIndex,6.)
call MultiboardSetItemWidthBJ(udg_Multiboard,4,bj_forLoopAIndex,10.)
call MultiboardSetItemWidthBJ(udg_Multiboard,5,bj_forLoopAIndex,6.)
call MultiboardSetItemWidthBJ(udg_Multiboard,6,bj_forLoopAIndex,10.)
call MultiboardSetItemWidthBJ(udg_Multiboard,7,bj_forLoopAIndex,6.)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemValueBJ(udg_Multiboard,1,16,"Time")
call MultiboardSetItemColorBJ(udg_Multiboard,1,16,100.,80.,20.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,1,1,("|cffff8000|r"+"The Alliance"))
call MultiboardSetItemColorBJ(udg_Multiboard,1,1,40.,80.,.0,0)
call MultiboardSetItemValueBJ(udg_Multiboard,1,3,("|cff8B4513"+"The Horde"))
call MultiboardSetItemColorBJ(udg_Multiboard,1,3,60.,40.,.0,0)
call MultiboardSetItemValueBJ(udg_Multiboard,2,1,"Total hero kills")
call MultiboardSetItemColorBJ(udg_Multiboard,2,1,100.,10.,10.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,2,3,"Total hero kills")
call MultiboardSetItemColorBJ(udg_Multiboard,2,3,100.,10.,10.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,4,1,"Total assists")
call MultiboardSetItemColorBJ(udg_Multiboard,4,1,100.,100.,.0,0)
call MultiboardSetItemValueBJ(udg_Multiboard,4,3,"Total assists")
call MultiboardSetItemColorBJ(udg_Multiboard,4,3,100.,100.,.0,0)
call MultiboardSetItemValueBJ(udg_Multiboard,6,1,"Total creep kills")
call MultiboardSetItemColorBJ(udg_Multiboard,6,1,10.,100.,10.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,6,3,"Total creep kills")
call MultiboardSetItemColorBJ(udg_Multiboard,6,3,10.,100.,10.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,3,1,"0")
call MultiboardSetItemValueBJ(udg_Multiboard,3,3,"0")
call MultiboardSetItemValueBJ(udg_Multiboard,5,1,"0")
call MultiboardSetItemValueBJ(udg_Multiboard,5,3,"0")
call MultiboardSetItemValueBJ(udg_Multiboard,7,1,"0")
call MultiboardSetItemValueBJ(udg_Multiboard,7,3,"0")
call MultiboardSetItemValueBJ(udg_Multiboard,2,5,"Players")
call MultiboardSetItemColorBJ(udg_Multiboard,2,5,100.,80.,20.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,3,5,"Hero kills")
call MultiboardSetItemColorBJ(udg_Multiboard,3,5,100.,80.,20.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,4,5,"Assists")
call MultiboardSetItemColorBJ(udg_Multiboard,4,5,100.,80.,20.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,5,5,"Deaths")
call MultiboardSetItemColorBJ(udg_Multiboard,5,5,100.,80.,20.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,6,5,"Ultimate cooldowns")
call MultiboardSetItemColorBJ(udg_Multiboard,6,5,100.,80.,20.,0)
call MultiboardSetItemValueBJ(udg_Multiboard,7,5,"Creeps")
call MultiboardSetItemColorBJ(udg_Multiboard,7,5,100.,80.,20.,0)
set bj_forLoopAIndex=6
set bj_forLoopAIndexEnd=15
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Trig_Multiboard())then
call MultiboardSetItemValueBJ(udg_Multiboard,2,bj_forLoopAIndex,(udg_Player_Colors[(bj_forLoopAIndex-5)]+GetPlayerName(Player(-1+((bj_forLoopAIndex-5))))))
else
call MultiboardSetItemValueBJ(udg_Multiboard,2,bj_forLoopAIndex,"<Unused>")
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemIconBJ(udg_Multiboard,1,2,"ReplaceableTextures\\CommandButtons\\BTNFootman.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,1,4,"ReplaceableTextures\\CommandButtons\\BTNChaosGrunt.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,2,2,"ReplaceableTextures\\CommandButtons\\BTNRifleman.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,2,4,"ReplaceableTextures\\CommandButtons\\BTNHeadhunter.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,3,2,"ReplaceableTextures\\CommandButtons\\BTNKnight.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,3,4,"ReplaceableTextures\\CommandButtons\\BTNTauren.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,4,2,"ReplaceableTextures\\CommandButtons\\BTNSorceress.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,4,4,"ReplaceableTextures\\CommandButtons\\BTNShaman.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,5,2,"ReplaceableTextures\\CommandButtons\\BTNMortarTeam.blp")
call MultiboardSetItemIconBJ(udg_Multiboard,5,4,"ReplaceableTextures\\CommandButtons\\BTNDemolisher.blp")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=7
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=16
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemStyleBJ(udg_Multiboard,bj_forLoopAIndex,bj_forLoopBIndex,true,false)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemStyleBJ(udg_Multiboard,bj_forLoopAIndex,2,true,true)
call MultiboardSetItemStyleBJ(udg_Multiboard,bj_forLoopAIndex,4,true,true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemStyleBJ(udg_Multiboard,6,2,true,false)
call MultiboardSetItemStyleBJ(udg_Multiboard,6,4,true,false)
set bj_forLoopAIndex=6
set bj_forLoopAIndexEnd=15
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemStyleBJ(udg_Multiboard,1,bj_forLoopAIndex,true,true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardDisplay(udg_Multiboard,true)
endfunction
function InitTrig_Create takes nothing returns nothing
set gg_trg_Glow=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_Glow,.1)
call TriggerAddAction(gg_trg_Glow,function Trig_Multiboard)
endfunction
function Trig_Update_Actions takes nothing returns nothing
local string cellValue
local integer ultiCd
set udg_Time=(udg_Time+1)
call MultiboardSetItemValueBJ(udg_Multiboard,2,16,getTime())
call MultiboardSetItemValueBJ(udg_Multiboard,1,2,("|cff006400"+I2S(udg_NumberOfFootmen)))
call MultiboardSetItemValueBJ(udg_Multiboard,2,2,("|cff006400"+I2S(udg_NumberOfFusiller)))
call MultiboardSetItemValueBJ(udg_Multiboard,3,2,("|cff006400"+I2S(udg_NumberOfKnights)))
call MultiboardSetItemValueBJ(udg_Multiboard,4,2,("|cff006400"+I2S(udg_NumberOfSorceress)))
call MultiboardSetItemValueBJ(udg_Multiboard,5,2,("|cff006400"+I2S(udg_NumberOfMortar)))
call MultiboardSetItemValueBJ(udg_Multiboard,1,4,("|cff8B4513"+I2S(udg_NumberOfGrunt)))
call MultiboardSetItemValueBJ(udg_Multiboard,2,4,("|cff8B4513"+I2S(udg_NumberOfHeadHunter)))
call MultiboardSetItemValueBJ(udg_Multiboard,3,4,("|cff8B4513"+I2S(udg_NumberOfTauren)))
call MultiboardSetItemValueBJ(udg_Multiboard,4,4,("|cff8B4513"+I2S(udg_NumberOfShaman)))
call MultiboardSetItemValueBJ(udg_Multiboard,5,4,("|cff8B4513"+I2S(udg_NumberOfDemolisher)))
set bj_forLoopAIndex=6
set bj_forLoopAIndexEnd=15
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(udg_Multiboard,1,bj_forLoopAIndex,(udg_Player_Colors[(bj_forLoopAIndex-5)]+("Level"+I2S(GetHeroLevel(udg_HeroPlaying[(bj_forLoopAIndex-5)])))))
call MultiboardSetItemValueBJ(udg_Multiboard,3,bj_forLoopAIndex,(udg_Player_Colors[(bj_forLoopAIndex-5)]+I2S(udg_HeroKilledNumber[(bj_forLoopAIndex-5)])))
call MultiboardSetItemValueBJ(udg_Multiboard,4,bj_forLoopAIndex,(udg_Player_Colors[(bj_forLoopAIndex-5)]+I2S(udg_HeroAssists[(bj_forLoopAIndex-5)])))
call MultiboardSetItemValueBJ(udg_Multiboard,5,bj_forLoopAIndex,(udg_Player_Colors[(bj_forLoopAIndex-5)]+I2S(udg_HeroDeadNumber[(bj_forLoopAIndex-5)])))
set cellValue=""
if IsPlayerAlly(Player(bj_forLoopAIndex-6),GetLocalPlayer())then
set ultiCd=R2I(TimerGetRemaining(udg_ultiTimerList[bj_forLoopAIndex-6]))
if ultiCd>0 then
set cellValue=udg_Player_Colors[(bj_forLoopAIndex-5)]+I2S(ultiCd)
endif
endif
call MultiboardSetItemValueBJ(udg_Multiboard,6,bj_forLoopAIndex,cellValue)
call MultiboardSetItemValueBJ(udg_Multiboard,7,bj_forLoopAIndex,(udg_Player_Colors[(bj_forLoopAIndex-5)]+I2S(udg_CreepKilledNumber[(bj_forLoopAIndex-5)])))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemValueBJ(udg_Multiboard,3,1,I2S((udg_HeroKilledNumber[1]+((udg_HeroKilledNumber[2]+udg_HeroKilledNumber[3])+(udg_HeroKilledNumber[4]+udg_HeroKilledNumber[5])))))
call MultiboardSetItemValueBJ(udg_Multiboard,3,3,I2S((udg_HeroKilledNumber[6]+((udg_HeroKilledNumber[7]+udg_HeroKilledNumber[8])+(udg_HeroKilledNumber[9]+udg_HeroKilledNumber[A])))))
call MultiboardSetItemValueBJ(udg_Multiboard,5,1,(""+I2S((udg_HeroAssists[1]+(udg_HeroAssists[2]+(udg_HeroAssists[3]+(udg_HeroAssists[4]+udg_HeroAssists[5])))))))
call MultiboardSetItemValueBJ(udg_Multiboard,5,3,(""+I2S((udg_HeroAssists[6]+(udg_HeroAssists[7]+(udg_HeroAssists[8]+(udg_HeroAssists[9]+udg_HeroAssists[A])))))))
call MultiboardSetItemValueBJ(udg_Multiboard,7,1,I2S((udg_CreepKilledNumber[1]+((udg_CreepKilledNumber[2]+udg_CreepKilledNumber[3])+(udg_CreepKilledNumber[4]+udg_CreepKilledNumber[5])))))
call MultiboardSetItemValueBJ(udg_Multiboard,7,3,I2S((udg_CreepKilledNumber[6]+((udg_CreepKilledNumber[7]+udg_CreepKilledNumber[8])+(udg_CreepKilledNumber[9]+udg_CreepKilledNumber[A])))))
call MultiboardDisplay(udg_Multiboard,true)
endfunction
function InitTrig_Update takes nothing returns nothing
set gg_trg_Central_Spawn_Alliance=CreateTrigger()
call TriggerRegisterTimerEventPeriodic(gg_trg_Central_Spawn_Alliance,1.)
call TriggerAddAction(gg_trg_Central_Spawn_Alliance,function Trig_Update_Actions)
endfunction
function Trig_Heroes_Conditions takes nothing returns boolean
return(IsUnitType(GetBuyingUnit(),UNIT_TYPE_HERO))!=null
endfunction
function Trig_Heroes_Actions takes nothing returns nothing
call TriggerSleepAction(.4)
set udg_HeroPlaying[(1+GetPlayerId(GetOwningPlayer(GetBuyingUnit())))]=GetBuyingUnit()
endfunction
function InitTrig_Heroes takes nothing returns nothing
set gg_trg_Heroes=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Heroes,EVENT_PLAYER_UNIT_SELL)
call TriggerAddCondition(gg_trg_Heroes,Condition(function Trig_Heroes_Conditions))
call TriggerAddAction(gg_trg_Heroes,function Trig_Heroes_Actions)
endfunction
function Trig_Kill_Conditions takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)==false)and(IsUnitEnemy(GetDyingUnit(),GetOwningPlayer(GetKillingUnit())))and(IsUnitType(GetDyingUnit(),UNIT_TYPE_STRUCTURE)==false)and(GetPlayerController(GetOwningPlayer(GetKillingUnit()))==MAP_CONTROL_USER))!=null
endfunction
function Trig_Kill_Actions takes nothing returns nothing
set udg_CreepKilledNumber[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]=(udg_CreepKilledNumber[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]+1)
endfunction
function InitTrig_Kill takes nothing returns nothing
set gg_trg_Kill=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Kill,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Kill,Condition(function Trig_Kill_Conditions))
call TriggerAddAction(gg_trg_Kill,function Trig_Kill_Actions)
endfunction
function Trig_Die_Conditions takes nothing returns boolean
return((IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO))and((1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))<B)and(GetPlayerSlotState(GetOwningPlayer(GetDyingUnit()))==PLAYER_SLOT_STATE_PLAYING))!=null
endfunction
function Trig_Die_Func002C takes nothing returns boolean
return(IsUnitEnemy(GetDyingUnit(),GetOwningPlayer(GetKillingUnit())))and(GetPlayerSlotState(GetOwningPlayer(GetKillingUnit()))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Trig_Die_Actions takes nothing returns nothing
set udg_HeroDeadNumber[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]=(udg_HeroDeadNumber[(1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))]+1)
if(Trig_Die_Func002C())then
set udg_HeroKilledNumber[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]=(udg_HeroKilledNumber[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]+1)
endif
endfunction
function InitTrig_Die takes nothing returns nothing
set gg_trg_Die=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Die,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_Die,Condition(function Trig_Die_Conditions))
call TriggerAddAction(gg_trg_Die,function Trig_Die_Actions)
endfunction
There is a big list of the errors here. However its not full.http://www.hiveworkshop.com/forums/pastebin.php?id=gr3lyi
The corrected code must create this http://s7.directupload.net/images/121109/3ll4myf7.png
P.S The original triggerer, didn't share the GUI version. So i have only this.