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

dialog wont show

Status
Not open for further replies.

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
guys, I have a very strange situation here.. I have function

JASS:
function ShowMenu takes nothing returns nothing
    call DialogClear(dia)
    call DialogSetMessage(dia, "Menu" )
    set but[1] = DialogAddButton( dia, "Play", 0 )
    set but[2] = DialogAddButton( dia, "High Score", 1 )
    set but[3] = DialogAddButton( dia, "Statistic", 2 )
    set but[4] = DialogAddButton( dia, "Achievments", 3 )
    set but[5] = DialogAddButton( dia, "Quit Game", 4 )
    call DialogDisplay(Player(0), dia, true)
endfunction

and then call it
  • Open
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Custom script: call ShowMenu()
dia is a dialog variable that I have initialized using text macro.. but the problem is the dialog won't be opened/shown.. what the hell is going on? :ogre_rage:

answer
JASS:
set dia = DialogCreate()
 
Last edited:
JASS:
function ShowMenu takes nothing returns nothing
    set dia = DialogCreate()
    call DialogClear(dia)
    call DialogSetMessage(dia, "Menu" )
    set but[1] = DialogAddButton( dia, "Play", 0 )
    set but[2] = DialogAddButton( dia, "High Score", 1 )
    set but[3] = DialogAddButton( dia, "Statistic", 2 )
    set but[4] = DialogAddButton( dia, "Achievments", 3 )
    set but[5] = DialogAddButton( dia, "Quit Game", 4 )
    call DialogDisplay(Player(0), dia, true)
endfunction
 
Status
Not open for further replies.
Top