• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Expected a name?

Status
Not open for further replies.
Level 6
Joined
Oct 26, 2005
Messages
190
Hey there, I saved my map the other day, and, without modifying this trigger it said Error "Expected a name" in the error console. It seemed to work properly like this before, so can you give me a hand on this?

  • ToF
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) has buff Torment of the Fallen ) Equal to True
    • Actions
      • Custom script: local unit Killer = GetKillingUnitBJ()
      • Custom script: local unit Killed = GetDyingUnit()
      • Custom script: local effect DeathEffect = AddSpecialEffectTargetUnitBJ( "chest", Killer, "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl" )
      • Custom script: call UnitDamageTargetBJ( Killed, Killer, ( GetUnitLifePercent(Killer) - ( GetUnitLifePercent(Killed)/100*3.00 * I2R(GetUnitAbilityLevelSwapped('A023', gg_unit_U00I_0112)) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
      • Wait 1.00 seconds
      • Custom script: call DestroyEffect(DeathEffect)
      • Custom script: set Killed = null
      • Custom script: set Killer = null
 
Please just use Jass. Especially when your trigger is 90% custom script. It just makes it hard for you to use, and for us to debug and read. I understand that you are probably just using custom script so you can use locals, but you don't need locals either. Just use a global or a hashtable.

Anyways, aside from that DSG is probably right. gg_unit_U00I_0112 is most likely an invalid unit.
 
Level 6
Joined
Oct 26, 2005
Messages
190
Well I'm not actually interested in working with jass since I don't know it and don't wanna learn it.

And as I said before, it worked back then like 4 months ago without touching the trigger or the unit or etc. I just changed some object data from another unit and when saving the error came.

But, are you saying I can use globals, even if I target this buff to several units at same time?
 
Status
Not open for further replies.
Top