SetPlayerSlotAvailable

Parameters
whichPlayer player

Initialize target player

control mapcontrol

Player's slot type

comment

This function is called in the scope of config to save map's slots settings in two arrays:

  • bj_slotControlUsed (index playerId, zero-based): true if player is defined in config (defaults to false).
  • bj_slotControl (index playerId, zero-based): value is of type mapcontrol for user/computer-controlled player (defaults to MAP_CONTROL_USER).
patch

1.00

return type
nothing
Source code
function SetPlayerSlotAvailable takes player whichPlayer, mapcontrol control returns nothing
    local integer playerIndex = GetPlayerId(whichPlayer)

    call CheckInitPlayerSlotAvailability()
    set bj_slotControlUsed[playerIndex] = true
    set bj_slotControl[playerIndex] = control
endfunction
Source
Blizzard.j
wc3modding.com
SetPlayerSlotAvailable