Convert Player to Integer? Shared Bounty System

xAnaMorphine

Active Member
Reaction score
43
Problem concerning the shared bounty system by andrewgosu.

JASS:
function InitTrig_SharedBounty takes nothing returns nothing
    set gg_trg_SharedBounty = CreateTrigger()
    set ALLIE_INDICATOR = Condition(function SharedBounty_Allied)
    call TriggerRegisterPlayerUnitEvent( gg_trg_SharedBounty, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH, null )
    call TriggerAddAction( gg_trg_SharedBounty, function SharedBounty_CreateBounty )   
    call SetPlayerState( Player(PLAYER_NEUTRAL_AGGRESSIVE), PLAYER_STATE_GIVES_BOUNTY, IntegerTertiaryOp( false, 1, 0 ) )
endfunction


I want the "PLAYER_NEUTRAL_AGGRESSIVE" to be Player 12 but if I use this

JASS:
function InitTrig_SharedBounty takes nothing returns nothing
    set gg_trg_SharedBounty = CreateTrigger()
    set ALLIE_INDICATOR = Condition(function SharedBounty_Allied)
    call TriggerRegisterPlayerUnitEvent( gg_trg_SharedBounty, Player(Player(11)), EVENT_PLAYER_UNIT_DEATH, null )
    call TriggerAddAction( gg_trg_SharedBounty, function SharedBounty_CreateBounty )   
    call SetPlayerState( Player(Player(11)), PLAYER_STATE_GIVES_BOUNTY, IntegerTertiaryOp( false, 1, 0 ) )
endfunction


I get the Error: Can not convert player to integer

So, as you can see, my knowledge of Jass is minimal.

P.S: To the creator of Jass, allow player conversations to integer pls.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top