- Joined
- Jan 11, 2009
- Messages
- 3,414
I use this code snippet for one of my systems:
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.
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.