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

[JASS] strange error

Status
Not open for further replies.
Level 10
Joined
Sep 29, 2006
Messages
447
ok so i keep getting an error message when i go to save my game and i dont know why. when i go to enable the trigger it gives me no error message but when i save it does. here's the message i get

Picture1.png



and here's my trigger:


JASS:
function Trig_Charge_Rocket_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A00J'
endfunction

function is_mechanical takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == true )
endfunction

function is_flying takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) == true )
endfunction

function unit_type takes nothing returns boolean
    return GetBooleanAnd( is_mechanical(), is_flying() )
endfunction

function kill_unit takes nothing returns nothing
    call KillUnit( GetEnumUnit() )
endfunction

function Trig_Charge_Rocket_Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local unit TempUnit
    local unit TempUnit2
    local location TempPoint = GetUnitLoc(caster)
    local location TempPoint2 = GetSpellTargetLoc()
    local group TempGroup
    set TempUnit = CreateUnitAtLoc( GetOwningPlayer(caster), 'h005', TempPoint, 270.00 )
    call UnitAddAbility( TempUnit, 'A02H' )
    call UnitApplyTimedLife( TempUnit, 'BTLF', 6.00 )
    set TempUnit2 = CreateUnitAtLoc( GetOwningPlayer(caster), 'h006', TempPoint, 270.00 )
    call UnitAddAbility( TempUnit, 'A02I' )
    call SetUnitAbilityLevelSwapped( 'A02I', TempUnit2, GetUnitAbilityLevelSwapped('A02G', caster) )
    call UnitApplyTimedLife( TempUnit2, 'BTLF', 6.00 )
    call IssueTargetOrder( TempUnit, "acidbomb", TempUnit2 )
    call TriggerSleepAction( ( DistanceBetweenPoints(TempPoint, TempPoint2) / 700.00 ) )
    call IssueImmediateOrder( TempUnit2, "thunderclap" )
    call DestroyEffect( AddSpecialEffectLoc( "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", TempPoint2 ) )
    call DestroyEffect( AddSpecialEffectLoc( "Abilities\\Weapons\\Bolt\\BoltImpact.mdl", TempPoint2 ) )
    set TempGroup = GetUnitsInRangeOfLocMatching(300.00, TempPoint2, Condition(function unit_type))
    call ForGroup( TempGroup, function kill_unit )
    call RemoveLocation(TempPoint)
    call RemoveLocation(TempPoint2)
    call DestroyGroup(TempGroup)
    set caster = null
    set TempUnit = null
    set TempUnit2 = null
endfunction

//===========================================================================
function InitTrig_Charge_Rocket takes nothing returns nothing
    set gg_trg_Charge_Rocket = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Charge_Rocket, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Charge_Rocket, Condition( function Trig_Charge_Rocket_Conditions ) )
    call TriggerAddAction( gg_trg_Charge_Rocket, function Trig_Charge_Rocket_Actions )
endfunction


does anyone know why this is happening?

the error comes when the map is saving it goes to Generate Map Script Variables

edit: here ill include my GUI version (which i know is not MUI thats why i changed it to JASS for the MUI and the native functions). On the GUI i still use destroy group but i get no error why is this? ive figured out that this error is linked to the groups

  • Charge Rocket
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Charge Rocket (Demolisher)
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempPoint2 = (Target point of ability being cast)
      • Unit - Create 1 dummy unit for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
      • Set TempUnit = (Last created unit)
      • Unit - Add charge rocket projectile to TempUnit
      • Unit - Add a 6.00 second Generic expiration timer to TempUnit
      • Unit - Create 1 dummy unit (vulnerable) for (Owner of (Triggering unit)) at TempPoint2 facing Default building facing degrees
      • Set TempUnit2 = (Last created unit)
      • Unit - Add charge rocket explosion to TempUnit2
      • Unit - Set level of charge rocket explosion for TempUnit2 to (Level of Charge Rocket (Demolisher) for (Triggering unit))
      • Unit - Add a 6.00 second Generic expiration timer to TempUnit2
      • Unit - Order TempUnit to Neutral Alchemist - Acid Bomb TempUnit2
      • Wait ((Distance between TempPoint and TempPoint2) / 700.00) seconds
      • Unit - Order TempUnit2 to Human Mountain King - Thunder Clap
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Weapons\Bolt\BoltImpact.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set TempGroup = (Units within 300.00 of TempPoint2 matching ((((Matching unit) is Mechanical) Equal to True) and (((Matching unit) is A flying unit) Equal to True)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Last edited:
Level 12
Joined
Apr 27, 2008
Messages
1,228
Jass code gives me no errors.
I suppose it is some issue connected with macs, but since I am not using one ...
 
Status
Not open for further replies.
Top