Warcraft III resources & community, 2003–2006 · archived

Help with this code - Game crashes!!

32 posts
#31
GetUnitTypeId(Kinara) == 'N002' and not (IsUnitType(Kill, UNIT_TYPE_STRUCTURE) == false) or (IsUnitType(Kill, UNIT_TYPE_ANCIENT) == false)
should be
GetUnitTypeId(Kinara) == 'N002' and not (IsUnitType(Kill, UNIT_TYPE_STRUCTURE) or IsUnitType(Kill, UNIT_TYPE_ANCIENT))

Shouldn't these go into the conditions of the trigger???

And:
GetLocationX(GetUnitLoc(Kinara)), GetLocationY(GetUnitLoc(Kinara))
shold be
GetUnitX(Kinara), GetUnitY(Kinara)
[/jass]
#32
I beat you to the condition, but I cant believe I missed that leak.

Ugh... I'm slipping as time goes by :P

Also, the code will break if G = null when you CountUnitsInGroup( G ).

PS. that function is ugly.