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

[Solved] Error when choosing a dialog button

Status
Not open for further replies.
Level 14
Joined
Nov 30, 2013
Messages
926
Hello.
While I testing my map using my dialog. When I choose a 1st dialog button (Gold Mode).
It's work fine. But on my 2nd dialog button (Life Mode). The game got error and automatically exited

Here's the trigger I created.

  • Dialog
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Dialog - Clear GameModeDialog
      • Dialog - Change the title of GameModeDialog to |cffffff00Choose a ...
      • Dialog - Create a dialog button for GameModeDialog labelled |cffffcc33Gold|r + ...
      • Set GameModeDialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for GameModeDialog labelled |cffffcc33Gold|r Mo...
      • Set GameModeDialogButton[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for GameModeDialog labelled |cff00ff00Life|r Mo...
      • Set GameModeDialogButton[3] = (Last created dialog Button)
      • Dialog - Show GameModeDialog for Player 2 (Blue)
2nd Trigger
  • Gold Mode
    • Events
      • Dialog - A dialog button is clicked for GameModeDialog
    • Conditions
      • (Clicked dialog button) Equal to GameModeDialogButton[2]
    • Actions
      • Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + has chosen |cffffcc33Gold|r Mode)
      • Trigger - Run Gold Mode Trigger <gen> (ignoring conditions)
3rd Trigger

  • Life Mode
    • Events
      • Dialog - A dialog button is clicked for GameModeDialog
    • Conditions
      • (Clicked dialog button) Equal to GameModeDialogButton[3]
    • Actions
      • Trigger - Run Life Mode <gen> (ignoring conditions)
      • Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + has chosen |cff00ff00Life|r Mode)
4th Trigger
  • Gold Mode Trigger
    • Events
    • Conditions
    • Actions
      • Set GoldModeString = |cff00ff00Chosen|r
      • Set GoldModeBoolean = True
5th Trigger
  • Life Mode Trigger
    • Events
    • Conditions
    • Actions
      • Set LifeModeString = |cff00ff00Chosen|r
      • Set LifeModeBoolean = True
 
Hm that seems strange.. I can't see any mistake in here. Are there maybe any other triggers who could cause this error?

Or you could attach map if you want, for simple testing. - Btw, you could put all "Clicked button" actions into one trigger.

And I also see no sense for running next trigger. You could just set ModeBoolean = true directly after cliking dialog button.
 
Level 14
Joined
Nov 30, 2013
Messages
926
Hm that seems strange.. I can't see any mistake in here. Are there maybe any other triggers who could cause this error?

Or you could attach map if you want, for simple testing. - Btw, you could put all "Clicked button" actions into one trigger.

And I also see no sense for running next trigger. You could just set ModeBoolean = true directly after cliking dialog button.

There's 4 Trigger I created that I didn't show yet. Maybe there could be a problem by which is the trigger could error.

1st Trigger
  • Player
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 2000
2nd Trigger
  • GameText
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: |cffff99ccWelcome i...
3rd Trigger
  • Gold Mode and Life Mode
    • Events
      • Dialog - A dialog button is clicked for GameModeDialog
    • Conditions
      • (Clicked dialog button) Equal to GameModeDialogButton[1]
    • Actions
      • Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + has chosen |cffffcc33Gold|r + |cff00ff00Life|r Mode)
      • Trigger - Run Gold Mode Trigger <gen> (ignoring conditions)
      • Trigger - Run Life Mode Trigger <gen> (ignoring conditions)
4th Trigger
  • Gamemode
    • Events
      • Player - Player 2 (Blue) types a chat message containing -gamemode as An exact match
      • Player - Player 3 (Teal) types a chat message containing -gamemode as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -gamemode as An exact match
      • Player - Player 6 (Orange) types a chat message containing -gamemode as An exact match
      • Player - Player 8 (Pink) types a chat message containing -gamemode as An exact match
      • Player - Player 9 (Gray) types a chat message containing -gamemode as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -gamemode as An exact match
      • Player - Player 12 (Brown) types a chat message containing -gamemode as An exact match
    • Conditions
    • Actions
      • Game - Display to (Player group((Triggering player))) the text: |cffff9933====GAMEM...
      • Game - Display to (Player group((Triggering player))) the text: (|cffffff33Gold Mode:|r + GoldModeString)
      • Game - Display to (Player group((Triggering player))) the text: (|cff33ff33Life Mode: |r + LifeModeString)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Your life mode trigger is infinitely recursive. It keeps running itself due to a silly reference error. It appears WC3 does not take this error gracefully and so closes itself (probably to prevent the system becoming unresponsive back in single core days). You meant to choose Life Mode Trigger and not Life Mode as the trigger reference.

  • Trigger - Run Life Mode <gen> (ignoring conditions)
Should be...

  • Trigger - Run Life Mode Trigger <gen> (ignoring conditions)
 
Status
Not open for further replies.
Top