• 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.

Issue

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
The output says it can't recognize 'Rug' variable.

JASS:
function flameEffect() {

integer pIdRug = GetPlayerId(GetOwningPlayer(GetEnumUnit()));
string Rug = GetPlayerName(Player(pIdRug));

 if (GetUnitTypeId(GetEnumUnit()) == 'E002' || GetUnitTypeId(GetEnumUnit()) == 'E001' || GetUnitTypeId(GetEnumUnit()) == 'U007' || GetUnitTypeId(GetEnumUnit()) == 'U008' || GetUnitTypeId(GetEnumUnit()) == 'AVFV') {
 if Rug == "[RG]RugarusVF"
   {
   AddSpecialEffectTargetUnitBJ("head", GetEnumUnit(), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeDamageTarget.mdl");
   AddSpecialEffectTargetUnitBJ("head", GetEnumUnit(), "Abilities\\Weapons\\GargoyleMissile\\GargoyleMissile.mdl");
    }
    }
  
    else if (GetUnitTypeId(GetEnumUnit()) == 'h010') {
    if Rug == "[RG]RugarusVF"
    {
    UnitRemoveAbilityBJ( 'A02B', GetEnumUnit());
    UnitAddAbilityBJ( 'A04B', GetEnumUnit());
    }
    }
}



function onColor() -> boolean {

ForGroupBJ(GetUnitsInRectAll(GetEntireMapRect()),function flameEffect);

}



private function onInit() {
  trigger trg = CreateListedTrigger();
  integer i;



  TriggerAddCondition(trg, Condition(function onColor));
}
 
Status
Not open for further replies.
Top