So while I was using a shadowed global variable things went as expected until now.
I wanted to make a dps calculation for each player that resets every 5 seconds.
Here is screenshot of the error and the trigger below.
I already checked that this is the only trigger that uses this variable.
I wanted to make a dps calculation for each player that resets every 5 seconds.
Here is screenshot of the error and the trigger below.
I already checked that this is the only trigger that uses this variable.
-
Dps
-

Events
-


Game - DamageEvent becomes Equal to 1.00
-
-

Conditions
-


(Owner of DamageEventSource) Not equal to Player 14 (Navy)
-


(Owner of DamageEventSource) Not equal to Player 21 (Coal)
-


(Owner of DamageEventSource) Not equal to Neutral Hostile
-


DamageEventAmount Less than 99999.00
-
-

Actions
-


Custom script: local unit udg_DPS_Unit = udg_DamageEventSource
-


Custom script: local real COUNTDOWN = 5
-


Custom script: local timer DPSTIMER
-


Custom script: local integer udg_DPS_Cv = GetConvertedPlayerId(GetOwningPlayer(udg_DPS_Unit))
-


Custom script: local integer udg_DPS_PlayerNumber = GetConvertedPlayerId(GetOwningPlayer(udg_DPS_Unit))
-


Custom script: local real array udg_DPS_Count
-


Set VariableSet DPS_Count[DPS_Cv] = (DPS_Count[DPS_Cv] + DamageEventAmount)
-


Custom script: set DPSTIMER = CreateTimer()
-


Custom script: call TimerStart(DPSTIMER,COUNTDOWN,false,null)
-


Custom script: call PolledWait(COUNTDOWN)
-


Multiboard - Set the text for MultiBoard item in column 3, row 2 to (String(((Integer(DPS_Count[(Player number of Player 1 (Red))])) / 60)))
-


Multiboard - Set the text for MultiBoard item in column 3, row 3 to (String(((Integer(DPS_Count[(Player number of Player 2 (Blue))])) / 60)))
-


Multiboard - Set the text for MultiBoard item in column 3, row 4 to (String(((Integer(DPS_Count[(Player number of Player 3 (Teal))])) / 60)))
-


Multiboard - Set the text for MultiBoard item in column 3, row 5 to (String(((Integer(DPS_Count[(Player number of Player 4 (Purple))])) / 60)))
-


Custom script: call PauseTimer(DPSTIMER)
-


Custom script: call DestroyTimer(DPSTIMER)
-


Custom script: set udg_DPS_Unit = null
-


Set VariableSet DPS_Count[DPS_Cv] = 0.00
-
-
