SetUnitUserData

Parameters
whichUnit unit
data integer
comment

Sets a single custom integer for a unit.

note

This value is not used by any standard mechanisms in Warcraft III nor in the blizzard.j, so it is free to be harnessed. Besides GetHandleId, this is an excellent possibility to assign a unique integer id to a unit, which can serve as an index in other data structures.

patch

1.07

Source
common.j
return type
nothing
Source code
native SetUnitUserData              takes unit whichUnit, integer data returns nothing