• 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] Weird Game Crash

Status
Not open for further replies.
Level 21
Joined
Aug 9, 2006
Messages
2,384
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.
 
Level 5
Joined
Oct 27, 2007
Messages
158
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?
 
Level 11
Joined
Aug 25, 2006
Messages
971
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.
Top