Embrace_It
New Member
- Reaction score
- 9
Yet another problem...This is a weird one though.
I have a system that can only register heroes.
I created a custom hero, and to further test the system I created another hero by copying the data from the first hero. I added the following debug message to the function, that checks whether or not the unit provided is a hero:
This outputs "(null)", which doesnt make sense. I call the function with gg_unit_O001_0009 as the unit argument. This works fine for hero 1, but not for unit 2. I then tried to create a hero from scratch, but it didnt work either.
The function tests like this:
Unless someone has an explain for this based on the above, I wont post the code for the system if it isnt necessary.
Thanks!
I have a system that can only register heroes.
I created a custom hero, and to further test the system I created another hero by copying the data from the first hero. I added the following debug message to the function, that checks whether or not the unit provided is a hero:
JASS:
call GetUnitName(whichhero)
This outputs "(null)", which doesnt make sense. I call the function with gg_unit_O001_0009 as the unit argument. This works fine for hero 1, but not for unit 2. I then tried to create a hero from scratch, but it didnt work either.
The function tests like this:
JASS:
if not IsUnitType(whichhero, UNIT_TYPE_HERO) then
call PassError("Must register talents for heroes only")
return
else
set id = GetHandleId(whichhero)
endif
Unless someone has an explain for this based on the above, I wont post the code for the system if it isnt necessary.
Thanks!