Custom Script Error

D359

Member
Reaction score
1
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Metamorphosis
    • Actions
      • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit('Eill'),true,GetLearnedSkillBJ('A02T'))[\WC3]
    • I keep geting 2 errors on this triger at the custom script,the first one apears when Eill isn't writen as above.The errors states that the line with the custom script needs a name,and when Eill is writen as above I get the following error:Invalid number of arguments.
    • Could someone explain to me where the code is writen wrong and how should it really look like.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Nothing should go into either of the internal brackets there.
Trigger:
  • Custom Script: call UnitMakeAbilityPermanent(GetTriggerUnit(),true,GetLearnedSkillBJ())

This should do it. That's how I made it. Otherwise you could try this:
Trigger:
  • Custom Script: call UnitMakeAbilityPermanent(GetTriggerUnit(),true,'A02T')

Also, you used the wrong slash for the closing tag - / to the left, not \ to the right.

EDIT: Maybe it was this. The 'A02T' quotation marks.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
What name error? Could you give a screenshot, or a test map where it goes wrong? It works fine each time I try it.

EDIT: Check above.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Just try to recreate the problem in a fresh map. Or, if you'd prefer, the actual map you've been working on, whcih might help explain the problem further. Go Advanced, then attach the map in your post.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Code:
Custom script:   call UnitMakeAbilityPermanent(GetTriggerUnit(), true, 'A000')
That should work, obviously with 'A000' changed to your rawcode.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Hopefully the map gets attached. Internet is causing things to appear HTML-ish here.

EDIT: Well, so it did. Do check it out.
 

Attachments

  • Permanence.w3x
    13.6 KB · Views: 148

D359

Member
Reaction score
1
You used only GUI,right?I noticed that there are 3 trigers here,do I copy them all?Will the triger work if the spellbook has levels(it can be leveled,the spells inside don't get leveled,for those of you who don't know this,level two spells of a spellbook replace all the spells of a level one spellbook)

Edit:I got errors when I copyed the triger,and I was serios in the PM.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top