• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] GetLastCreatedUnit() problem

Status
Not open for further replies.
I use this code snippet for one of my systems:

JASS:
call GroupAddUnit(g, CreateUnitAtLoc(p, gType(2), l, 0.))
    call SetUnitUserData(GetLastCreatedUnit(), id)
    call BJDebugMsg(GetUnitName(GetLastCreatedUnit()))

But somehow, debug returns null, thus GetLastCreatedUnit is never registered.
is this some bug or do i really have to create the unit first and asign group thereafter for it to work?
I guess it's no big deal, but it's a strange thing it doesent work.
 
Status
Not open for further replies.
Top