- Joined
- May 28, 2011
- Messages
- 455
I am having painful problem with desync function. After finding solution and keep on changing the code, it still occurs. May I ask for your help to verify that each desync function is ok or not? Credit and +rep will be given to all who help me!!!
I start off with this code. Multiboard update gold amount to team only.
I start off with this code. Multiboard update gold amount to team only.
JASS:
set i = 0
loop
exitwhen( i >= 8)
set p = Player( i)
if(IsPlayerInForce(p, Players)) then
set playerId = GetPlayerId( p)
set row = LoadInteger( Info_Ht, playerId, MULTIBOARD_ROW_KEY)
set gold = MULTIBOARD_PLAYER_GOLD_COLOR_CODE + I2S(GetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD)) + "|r"
if( not IsPlayerAlly( GetLocalPlayer(), p)) then
set gold = ""
endif
set mbItem = MultiboardGetItem( MultiB, row, MULTIBOARD_PLAYER_GOLD)
call MultiboardSetItemValue( mbItem, gold)
endif
set i = i + 1
endloop