Why does 'Owner of Unit' return 16 here?

Liquidj

New Member
Reaction score
1
Can someone help me understand why I'm getting these errors in the console using this event? Why would I be getting a value of 16 for a player?

00:00:15.19 Trigger Error in 'lib1_gt_DetectSupplyBlock_Func': Could not get 'player' from parameter in 'PlayerGetPropertyInt' (value: 16)
00:00:15.19 Trigger Error in 'lib1_gt_DetectSupplyBlock_Func': Could not get 'player' from parameter in 'PlayerGetPropertyInt' (value: 16)
00:00:15.19 Trigger Error in 'lib1_gt_DetectSupplyBlock_Func': Could not get 'player' from parameter in 'PlayerGetPropertyInt' (value: 16)
00:00:15.19 Trigger Error in 'lib1_gt_DetectSupplyBlock_Func': Could not get 'player' from parameter in 'PlayerGetPropertyInt' (value: 16)

Code:
Detect Supply Block
    Events
        Unit - Any Unit training progress is Started
    Local Variables
        i_player = 0 <Integer>
        i_suppliesUsed = 0 <Integer>
    Conditions
    Actions
        Variable - Set i_player = (Owner of (Triggering progress unit))
        Variable - Set i_suppliesUsed = (Player i_player Supplies Used)
        General - If (Conditions) then do (Actions) else do (Actions)
            If
                And
                    Conditions
                        i_suppliesUsed >= (Player i_player Supplies Made)
                        i_suppliesUsed < ((Player i_player Supplies Limit) - 10)
            Then
                General - If (Conditions) then do (Actions) else do (Actions)
                    If
                        (Elapsed time of gi_arr_supplyBlockedTimers[(Owner of (Triggering progress unit))]) == 0.0
                    Then
                        ------- Timer is set to last longer than the 1 minute score check time.
                        Debug - Display ("Supply Blocked @ (" + (Combine ((Text(i_suppliesUsed)), "/", (Text((Player i_player Supplies Made))), ")"))) as debug output using Type 1, and Do display it in the game window
                        Timer - Start gi_arr_supplyBlockedTimers[i_player] as a One Shot timer that will expire in 61.0 Game Time seconds
                    Else
                        Debug - Display ("Supply Blocked @ (" + (Combine ((Text(i_suppliesUsed)), "/", (Text((Player i_player Supplies Made))), ")"))) as debug output using Type 1, and Do display it in the game window
                        Timer - Unpause gi_arr_supplyBlockedTimers[i_player]
            Else
                Debug - Display ("Supply Available @ (" + (Combine ((Text(i_suppliesUsed)), "/", (Text((Player i_player Supplies Made))), ")"))) as debug output using Type 1, and Do display it in the game window
 

Liquidj

New Member
Reaction score
1
I'm an idiot. For anyone else who stays up so late that they become stupid, this trigger's instructions clearly say to use (triggering player) to find the player that triggered the train.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top