• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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