• 🏆 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!

[Crash] Disabling a trigger

Status
Not open for further replies.
Level 9
Joined
Dec 31, 2016
Messages
316
When I disabled a trigger and tried to enable it again it pops up a screen that said there were more than 5000 errors and that the trigger cannot be enabled, I had not changed anything I just disabled it and almost immediatelly enabled after that. Why did this happen?

P.S.: I use "jass new gen pack 2.0".

"Map test aborted due to script errors", kill me.
 
Last edited by a moderator:
I have found out that it is caused by something in jass new gen pack. It happens also when you create a new map and disable the standard w3 trigger.

Judging by that scenario, it could be possible that you disabled JassHelper. It could be due to a broken rar file which you downloaded and extracted, severely reducing its' functionality. But just to be safe, you really might want to post your trigger here.

If it is in GUI, you could use these tags: [trigger][/trigger]

Example:
  • Random Event
    • Event - Some event is running and this trigger catches it
    • Condition - Bah, let's allow anything triggering this trigger to run it
    • Actions-
      • - Custom Script: call UnitDamageTarget(GetTriggerUnit(), GetTriggerUnit(), GetWidgetLife(GetTriggeringUnit()), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null)
If it is in JASS, you could use either one of these tags: [code][/code] or [code=jass][/code]

For readability purposes, it is recommended to use [code=jass] tags for posting your jass code.

Example:
JASS:
        function Trig_Random_Event_Conditions takes nothing returns boolean
            if ( not (true)) then
                return false
            endif
            return true
        endfunction
        
        function Trig_Random_Event_Actions takes nothing returns nothing
            call UnitDamageTarget(GetTriggerUnit(), GetTriggerUnit(), GetWidgetLife(GetTriggerUnit()), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null)
        endfunction

        function InitTrig_Random_Event takes nothing returns nothing
            set gg_trg_Random_Event = CreateTrigger( )
            //  call TriggerRegisterSomeRandomEvent(
            //  Note that code coming after the // is considered a comment and will not be processed by the compiler
            call TriggerAddCondition(gg_trg_Random_Event, Condition(function Trig_Random_Event_Conditions))
            call TriggerAddAction(gg_trg_Random_Event, function Trig_Random_Event_Actions)
        endfunction
 
Level 9
Joined
Dec 31, 2016
Messages
316
I see, so is not it normal with using JNGP? And how to fix it? I wrote that it happens even with standard melee trigger (regardless of what trigger it is), thus posting some trigger here is sort of purposeless. :)
 
Level 9
Joined
Dec 31, 2016
Messages
316
This option has never been checked, but recently I have turned it on and it works just fine. The jass new gen pack itself has some broken code lines, because of that I must have turn on "disable syntax checker" and "alway allow trigger enable".
 
Status
Not open for further replies.
Top