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

[Solved] "Expected a name"

Status
Not open for further replies.
Level 1
Joined
Jul 9, 2012
Messages
2
Hi, not new to the world editor but this is the first time I've tried my hand at custom scripts / JASS, not entirely sure what to call it.

I'm following this guide on spellbooks.
http://www.thehelper.net/threads/how-to-make-spellbooks.27637/

The problem is that once I level up some of my spellbook Abilities, that some of the abilities disappear. I would normally just look for a different ability to use but the Channel ability is disappearing!

The guide covers this issue, and tells me to use the following custom script:
JASS:
call UnitMakeAbilityPermanent(whichUnit, true, abilCode)
Replace whichUnit with the unit who has the ability and abilCode with the raw code of the ability.

Tried googling for this error / spellbook tutorials and nothing goes into any further detail. Not sure what exactly to put in the "whichUnit" variable (not 100% on programming terms, sorry).

This is what I guessed I should do:

  • Untitled Trigger 002
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Strength
    • Actions
      • Set permunit = TestHero 0002 <gen>
      • Custom script: call UnitMakeAbilityPermanent( udg_permunit, true, A003)
This throws 1 compile error: "Line 29: Expected a name"

From what I can tell the unit's name is H000:Hpal (TestHero), when I select it on the map it is named TestHero 0002.

JASS:
globals
    // User-defined
    unit                    udg_permunit               = null

    // Generated
    trigger                 gg_trg_Untitled_Trigger_002 = null
    unit                    gg_unit_H000_0002          = null
endglobals

If someone can help me with this I would very much appreciate it!
I hope I have provided enough information.
 
Status
Not open for further replies.
Top