• 🏆 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!

[SOLVED] 3 Script Errors!

Status
Not open for further replies.
Level 2
Joined
Mar 6, 2010
Messages
26
Hello huys.
I am new to jass and custom script and stuff. i found out I needed it for a trigger. But I only get Script error with the trigger. Can anyone tell me what I did wrong?
There are my errors:
Expected 'endif'
Expected a variable name
Expected a name
  • Quest 5 Summoning Stone
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Arghar
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) is in (Units in Pit of Corruption <gen>)) Equal to True
        • Then - Actions
          • Custom script: local location Ability_Target_Point
          • Custom script: set Ability_Target_Point = GetSpellTargetLoc()
          • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Items\VampiricPotion\VampPotionCaster.mdl
          • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Undead\UnholyAura\UnholyAura.mdl
          • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
          • Player Group - Pick every player in (All players) and do (Camera - Shake the camera for (Picked player) with magnitude 3.00)
          • Game - Display to (All players) the text: Arghar: Who dares t...
          • Wait 5.00 seconds
          • Custom script: call CreateNUnitsAtLoc( 1, 'n00C', Player(10), Ability_Target_Point, 300.00 )
        • Else - Actions
          • Do nothing
EDIT: never mind. I dont know how to delete my thread but my problem is beeing solved.
 
The local is declared after the beginning of the function, which isn't allowed. They must always be declared at the beginning of the function. :)

  • Quest 5 Summoning Stone
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Arghar
    • Actions
      • Custom script: local location Ability_Target_Point
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) is in (Units in Pit of Corruption <gen>)) Equal to True
        • Then - Actions
          • Custom script: set Ability_Target_Point = GetSpellTargetLoc()
          • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Items\VampiricPotion\VampPotionCaster.mdl
          • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Undead\UnholyAura\UnholyAura.mdl
          • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
          • Player Group - Pick every player in (All players) and do (Camera - Shake the camera for (Picked player) with magnitude 3.00)
          • Game - Display to (All players) the text: Arghar: Who dares t...
          • Wait 5.00 seconds
          • Custom script: call CreateNUnitsAtLoc( 1, 'n00C', Player(10), Ability_Target_Point, 300.00 )
          • Custom script: call RemoveLocation(Ability_Target_Point)
          • Custom script: set Ability_Target_Point = null
        • Else - Actions
          • Do nothing
That would be the proper method. :) Note that I've added two extra custom scripts towards the end of the "Then - Actions". Those are simply to prevent leaks.

EDIT: Whoops, I didn't know this was solved.
 
Status
Not open for further replies.
Top