- Joined
- Dec 2, 2016
- Messages
- 733
Below is the entire function, but this was working yesterday and now it's erroring with this.
Screenshot - 2a52d29317b516085fd7d422f72432f7 - Gyazo
it highlights this as the issue
Screenshot - 2a52d29317b516085fd7d422f72432f7 - Gyazo
it highlights this as the issue
Code:
"VFG_Members[1] = "RugarusVF""
JASS:
function UpdateMultiboardPlayer takes integer p returns nothing
local string name
local integer i = 0
local integer membersLoop_i = 1
local boolean ismax = true
local boolean ismin = true
local string color
local string VFG_Player
local string array VFG_Members
local integer members = 3
VFG_Members[1] = "RugarusVF"
VFG_Members[2] = "Waterwalker007"
VFG_Members[3] = "Pedram"
if mb == null or PlayerRow == 0 then
return
endif
set playerName = GetPlayerName(Player(p))
//if players.state == STATE_PLAYING then
loop
exitwhen membersLoop_i > members
if playerName == VFG_Members[membersLoop_i] then
if players.state == 0 then
set name = "|cff808080" + "[VFG]" + GetPlayerName(Player(p)) + "Dead" + "|r" // dead
else
call DisplayTextToPlayer( Player(0),0,0, players.state)
set name = colors.web + "[VFG]" + GetPlayerName(Player(p)) + "|r"
endif
else
if players.state == STATE_DEAD then
set name = "|cff808080" + GetPlayerName(Player(p)) + "Dead" + "|r" // dead
else
set name = colors.web + GetPlayerName(Player(p)) + "|r"
endif
endif
set membersLoop_i = membersLoop_i + 1
endloop
call MultiboardSetItem(PlayerRow, 0, name)
if IsPlayerAlly(Player(p), GetLocalPlayer()) then
call MultiboardSetItem(PlayerRow, 1, "|cffffcc00" + I2S(GetPlayerState(Player(p), PLAYER_STATE_RESOURCE_GOLD)) + "|r")
call MultiboardSetItem(PlayerRow, 2, "|cff9dbb61" + I2S(GetPlayerState(Player(p), PLAYER_STATE_RESOURCE_LUMBER)) + "|r")
else
call MultiboardSetItem(PlayerRow, 1, "-")
call MultiboardSetItem(PlayerRow, 2, "-")
endif
if players.side == SIDE_HUMAN and players.humanFeed > 0 then
loop
exitwhen i > 11
if players[i].side == SIDE_HUMAN then
if players[i].humanFeed > players.humanFeed then
set ismax = false
elseif players[i].humanFeed < players.humanFeed then
set ismin = false
endif
endif
set i = i + 1
endloop
if ismax then
call MultiboardSetItem(PlayerRow, 3, "|cffff0404" + I2S(players.humanFeed) + "|r")
elseif ismin then
call MultiboardSetItem(PlayerRow, 3, "|cff20c000" + I2S(players.humanFeed) + "|r")
else
call MultiboardSetItem(PlayerRow, 3, "|cffffcc00" + I2S(players.humanFeed) + "|r")
endif
elseif (players.side == SIDE_VAMPIRE or players.side == SIDE_MINION) and players.vampireTotalFeed > 0 then
loop
exitwhen i > 11
if players[i].side == SIDE_VAMPIRE or players[i].side == SIDE_MINION then
if players[i].vampireTotalFeed > players.vampireTotalFeed then
set ismax = false
elseif players[i].vampireTotalFeed < players.vampireTotalFeed then
set ismin = false
endif
endif
set i = i + 1
endloop
if ismax then
set color = "|cffff0404"
elseif ismin then
set color = "|cff20c000"
else
set color = "|cffffcc00"
endif
call MultiboardSetItem(PlayerRow, 3, color + I2S(players.vampireGoldFeed)+ "|r") // LUMBER LEAK REMOVED
endif
endfunction
private function UpdateTime takes nothing returns nothing
local integer i = 0
if mb == null then
return
endif
call MultiboardSetTitleText(mb, "Game time: " + TimeString(GameTime()))
loop
exitwhen i > 11
call UpdateMultiboardPlayer(i)
set i = i + 1
endloop
endfunction