• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] Weird Game Crash

Status
Not open for further replies.
JASS:
function MagmaBarricadeConditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'
endfunction

function MagmaBarricadeSetUp takes nothing returns nothing
    //local unit MagmaCaster = GetTriggerUnit()
    //local player MagmaCasterOwner = GetOwningPlayer(MagmaCaster)
    //local real x = GetUnitX(MagmaCaster)
    //local real y = GetUnitY(MagmaCaster)
    //local real x1 = 0
    //local real y1 = 0
    //local real facing = 0
    //local group RockGroup = CreateGroup()
    //local integer RockCount = 8
    //local unit RockUnit
    //loop
        //exitwhen RockCount == 0
        //set x1 = x + (GetRandomReal(200.00, 600.00)) * Cos(facing * bj_DEGTORAD )
        //set y1 = y + (GetRandomReal(200.00, 600.00)) * Sin(facing * bj_DEGTORAD )
        //set RockUnit = CreateUnit(MagmaCasterOwner, 'n000', x1, y1, 0.00)
        //call GroupAddUnit(RockGroup, RockUnit)
        //set RockCount = RockCount - 1
        //set facing = facing + GetRandomReal(10, 45)
        //set RockUnit = null
    //endloop
endfunction

//===========================================================================
function InitTrig_MagmaBarricade takes nothing returns nothing
    set gg_trg_MagmaBarricade = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_MagmaBarricade, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_MagmaBarricade, Condition( function MagmaBarricadeConditions ) )
    call TriggerAddAction( gg_trg_MagmaBarricade, function MagmaBarricadeSetUp )
endfunction

This is very weird, it crashes even when i deactivate all the problem parts in the jass trigger. It crashes my whole wc3.
 
For the trigger part you should replace GetTriggerUnit() with GetSpellAbilityUnit()

As far as the crash. Are you sure its this trigger that's causing the crash? I assume you tried disabling the trigger completely?
 
He release a fix to the war3err bug (very) close to the end of the thread. Apparently he rolled back some feature he had forgotten to mention.
 
Status
Not open for further replies.
Back
Top