HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

vJASS Structs error, why?

07-04-2007, 04:38 PM#1
darkwulfv
Ignore any leaks, issues, etc. with this script, it isn't done. I was just saving it for the syntax checker, when it said this line:
Collapse JASS:
function InitTrig_Howl_of_the_Pack takes nothing returns nothing
was a syntac error when parsing under "structs". Can ANYONE tell me why it's doing that? There's no other trigger by the same name, so it can't be that. Thanks ahead of time.

Collapse JASS:
function Howl_of_the_Pack_Conditions takes nothing returns boolean
    return ( GetSpellAbilityId() == 'A023' )
endfunction

function Howl_of_the_Pack_Actions takes nothing returns nothing
  local unit u = GetTriggerUnit()
  local unit f
  local unit f2
  local group g = CreateGroup()
  local group allies = CreateGroup()
  local real x = GetUnitX(u)
  local real y = GetUnitY(u)
  local real radius = 0
  local real damage = 20
  local integer lvl = GetUnitAbilityLevel(u, 'A023')
  local integer num = 0
  local integer SI = 0
  local integer SI2 = 0
  local effect array ASFX 
  local effect array ESFX
  local player p = GetOwningPlayer(u)
set g = GroupEnumUnitsInRange(g, x, y, 650, null)
set f = FirstOfGroup(g)

   loop
   exitwhen f == null
      if IsUnitAlly(p, f) == true then
          call GroupAddUnit(allies, f)
          call GroupRemoveUnit(g, f)         
      set f = FirstOfGroup(g)
      else 
          call GroupRemoveUnit(g, f)
      set f = FirstOfGroup(g)
      endif
   endloop

set num = CountUnitsInGroup(allies)

   loop
   exitwhen num < 0
   set radius = radius + (lvl * 75)
   set damage = damage + (lvl * 4)  
   set num = num - 1
   endloop

    call PolledWait(1.)
set g = GroupEnumUnitsInRange(g, x, y, radius, null)
set f = FirstOfGroup(g)
  
   loop
   exitwhen f == null
      if IsUnitAlly(p, f) ==  true then
          call GroupRemoveUnit(g, f)
      set f = FirstOfGroup(g)
      endif
      set f2 = FirstOfGroup(allies)
          call UnitDamageTarget(u, f, damage, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null)
         if f2 != null then
         set ASFX[SI] = AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl", f2, "origin")
         endif
      set ESFX[SI2] = AddSpecialEffectTarget("Abilities\\Spells\\Other\\Silence\\SilenceAreaBirth.mdl", f, "head")
          call GroupRemoveUnit(g, f)
          call GroupRemoveUnit(allies, f2)
      set SI = SI + 1
      set SI2 = SI2 + 1
      set f = FirstOfGroup(g)
      set f2 = FirstOFGroup(allies)
      endloop
      
   
//===========================================================================
function InitTrig_Howl_of_the_Pack takes nothing returns nothing
  local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition(t, Condition( function Howl_of_the_Pack_Conditions ) )
    call TriggerAddAction(t, function Howl_of_the_Pack_Actions )
set t = null
endfunction
07-04-2007, 05:08 PM#2
Rising_Dusk
...
There's no "endfunction" to the function above the InitTrig...
07-04-2007, 08:08 PM#3
darkwulfv
-.-;

Wow. Thanks... Like I said I was working on it... Heh.
07-04-2007, 08:28 PM#4
Captain Griffen
When stuck, look above the line it says is wrong.