darkbeer
Beer is Good!
- Reaction score
- 84
Hey,
as i already mentioned i got a problem with the function MultiboardSetItemWidthBJ, i'm creating a different multiboard for every player, so i loop through all to set them up. However when integer i reaches 7 i get an error message: "Hit op limit in function MultiboardSetItemWidthBJ( One really large number, 1, 15, 6)"
this is my code:
I wonder why it only appears after integer i reaches 7, since the function MultiboardSetItemWidthBJ itself should have nothing to do with the loop.
EDIT: Strange, if i remove the problem causing line, another starts to give me nearly the same error.
as i already mentioned i got a problem with the function MultiboardSetItemWidthBJ, i'm creating a different multiboard for every player, so i loop through all to set them up. However when integer i reaches 7 i get an error message: "Hit op limit in function MultiboardSetItemWidthBJ( One really large number, 1, 15, 6)"
this is my code:
JASS:
private function Actions takes nothing returns nothing
local integer i = 0
local UnitData dat
loop
exitwhen i >= 12
set PlayerBoard<i> = CreateMultiboard()
call MultiboardSetColumnCount(PlayerBoard<i>, 5)
call MultiboardSetRowCount(PlayerBoard<i>, 15)
call MultiboardSetItemWidthBJ(PlayerBoard<i>,0, 0, 8)
call MultiboardSetItemWidthBJ(PlayerBoard<i>,5, 0, 0)
call MultiboardSetItemsStyle(PlayerBoard<i>, true, false)
call MultiboardSetTitleTextColor(PlayerBoard<i>, 255, 255, 255, 255)
call MultiboardSetTitleText(PlayerBoard<i>, Color("Character Status:", i))
//Name
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 1, "|cffffcc00" + "Name: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 1, 3)
//Kills
call MultiboardSetItemValueBJ(PlayerBoard<i>, 3, 1, "|cffffcc00" + "Kills: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 3, 1, 3)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 3, 2, "|cffffcc00" + "Damage dealt: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 3, 2, 7)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 2, "|cffffcc00" + "Score: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 2, 3)
//Equipment
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 12, "|cffffcc00" + "Weapon: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 12, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 13, "|cffffcc00" + "Health: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 13, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 14, "|cffffcc00" + "Damage Bonus: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 14, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 15, "|cffffcc00" + "Effect: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 15, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 3, 12, "|cffffcc00" + "Armor: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 3, 12, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 3, 13, "|cffffcc00" + "Health: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 3, 13, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 3, 14, "|cffffcc00" + "Armor Bonus: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 3, 14, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 3, 15, "|cffffcc00" + "Effect: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 3, 15, 6)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 4, "|cffffcc00" + "Health: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 4, 5)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 5, "|cffffcc00" + "Mana: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 5, 5)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 6, "|cffffcc00" + "Experience: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 6, 7)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 1, 8, "|cffffcc00" + "Gold: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 1, 8, 4)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 3, 8, "|cffffcc00" + "Items: " + "|r")
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 2, 8, 6)
set dat = UnitData.Get(Hero<i>)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 2, 1, Color(GetHeroProperName(dat.whichunit), i))
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 2, 1, 11)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 2, 2, Color(R2S(dat.score), i))
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 2, 2, 11)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 4, 1, Color(I2S(dat.kills), i))
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 4, 1, 10)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 4, 2, SubString(Color(R2S(dat.damagedealt), i), 0, StringLength(Color(R2S(dat.damagedealt), i)) - 4))
//call MultiboardSetItemWidthBJ(PlayerBoard<i>, 4, 2, 5)
call MultiboardSetItemValueBJ(PlayerBoard<i>, 2, 8, I2S(GetPlayerState(GetOwningPlayer(dat.whichunit),PLAYER_STATE_RESOURCE_GOLD)))
call MultiboardSetItemWidthBJ(PlayerBoard<i>, 2, 8, 8)
call BJDebugMsg("Index: " + I2S(i))
if GetLocalPlayer() == Player(i) then
call MultiboardDisplay(PlayerBoard<i>, true)
endif
set i = i + 1
endloop
endfunction</i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i>
I wonder why it only appears after integer i reaches 7, since the function MultiboardSetItemWidthBJ itself should have nothing to do with the loop.
EDIT: Strange, if i remove the problem causing line, another starts to give me nearly the same error.