Dialog Problem

WilliamPa

Active Member
Reaction score
51
So, i have a dialog problem, it won't show up.

No need to make the code more efficient, just need to know why it won't show up.
Whole Trigger:
JASS:
scope Multiboard initializer Init

    globals
        private multiboard mboard
        private constant string title = "Map made by FrostWarp -- Thanks to peteri1111 for ideas and objects -- Both can be met at Clan PH @ Northrend --- Map made by FrostWarp -- Thanks to peteri1111 for ideas and objects -- Both can be met at Clan PH @ Northrend"
        private integer titleloc = 1
        private dialog dlog
        private button array dlogbutton
        private boolean array takechange
        private integer array plrnumber
    endglobals
        
    private function Initializion takes nothing returns nothing
        local integer LoopCount = 1
        local integer LoopEnd = 12
        set mboard = CreateMultiboardBJ(2, 14, "")
        loop
        exitwhen LoopCount > LoopEnd
            if GetPlayerController(Player(LoopCount - 1)) == MAP_CONTROL_USER then
                call MultiboardSetItemIconBJ(mboard, 1, LoopCount+1, "ReplaceableTextures\\WorldEditUI\\Editor-MultipleUnits.blp")
                call MultiboardSetItemValueBJ(mboard, 1, LoopCount+1, GetPlayerName(Player(LoopCount-1)))
            else
                call MultiboardSetItemValueBJ(mboard, 1, LoopCount + 1, "No Player")
            endif
            call MultiboardSetItemWidthBJ(mboard, 1, LoopCount + 1, 10)
            call MultiboardSetItemWidthBJ(mboard, 2, LoopCount + 1, 10)
        set LoopCount = LoopCount + 1
        endloop
        call MultiboardSetItemValueBJ(mboard, 1, 1, "Name")
        call MultiboardSetItemValueBJ(mboard, 2, 1, "Known Status")
        call MultiboardSetItemWidthBJ(mboard, 1, 1, 10)
        call MultiboardSetItemWidthBJ(mboard, 2, 1, 10)
    endfunction
    
    private function UpdateTitle takes nothing returns nothing
        call MultiboardSetTitleText(mboard, SubString(title, titleloc, titleloc + 20))
        set titleloc = titleloc + 1
        if titleloc > 112 then
            set titleloc = 1
        endif
    endfunction
    
    private function ShowDialog takes nothing returns nothing
        call DialogDisplayBJ(true, dlog, GetTriggerPlayer())
    endfunction
    
    private function Initializion2 takes nothing returns nothing
        local integer LoopCount = 1
        local integer LoopEnd = 12
        set dlog = DialogCreate()
        loop
        exitwhen LoopCount > LoopEnd
            set dlogbutton[LoopCount] = DialogAddButton(dlog, "Player " + I2S(LoopCount), LoopCount - 1)
        set LoopCount = LoopCount + 1
        endloop
        call DialogSetMessage(dlog, "Which player?|nHotkeys: 0-9")
    endfunction
    
    private function Change takes nothing returns nothing
        set takechange[GetConvertedPlayerId(GetTriggerPlayer())] = false
        call MultiboardSetItemValueBJ(mboard, 2, GetConvertedPlayerId(GetTriggerPlayer()) + 2, GetEventPlayerChatString())
    endfunction
    
    private function ShowDialogCondition takes nothing returns boolean
        return not(takechange[GetConvertedPlayerId(GetTriggerPlayer())])
    endfunction
    
    private function EndDialog takes nothing returns nothing
        local integer LoopCount = 1
        local integer LoopEnd = 12
        call DisplayTextToForce(GetForceOfPlayer(GetTriggerPlayer()), "Please send a message containing the status you want to register")
        set takechange[GetConvertedPlayerId(GetTriggerPlayer())] = true
        loop
        exitwhen LoopCount > LoopEnd
            if GetClickedButtonBJ() == dlogbutton[LoopCount] then
                set plrnumber[GetConvertedPlayerId(GetTriggerPlayer())] = LoopCount
            endif
        set LoopCount = LoopCount + 1
        endloop
    endfunction
    
    private function ChangeCondition takes nothing returns boolean
        return takechange[GetConvertedPlayerId(GetTriggerPlayer())]
    endfunction
    
    private function Init takes nothing returns nothing
        local trigger t = CreateTrigger()
        local timer time = CreateTimer()
        local integer LoopCount = 1
        local integer LoopEnd = 12
        loop
        exitwhen LoopCount > LoopEnd
            set takechange[LoopCount] = false
        set LoopCount = LoopCount + 1
        endloop
        call TriggerRegisterTimerEvent(t, 0.1, true)
        call TriggerAddAction(t, function UpdateTitle)
        set t = null
        call TimerStart(time, 0.02, false, function Initializion)
        set time = null
        set time = CreateTimer()
        call TimerStart(time, 0.02, false, function Initializion2)
        set time = null
        set t = CreateTrigger()
        set LoopCount = 1
        loop
        exitwhen LoopCount > LoopEnd
            call TriggerRegisterPlayerChatEvent(t, Player(LoopCount), "-setstatus", true)
        set LoopCount = LoopCount + 1
        endloop
        call TriggerAddAction(t, function ShowDialog)
        call TriggerAddCondition(t, Condition(function ShowDialogCondition))
        set t = null
        set t = CreateTrigger()
        set LoopCount = 1
        loop
        exitwhen LoopCount > LoopEnd
            call TriggerRegisterPlayerChatEvent(t, Player(LoopCount-1), "", false)
        set LoopCount = LoopCount + 1
        endloop
        call TriggerAddAction(t, function Change)
        call TriggerAddCondition(t, Condition(function ChangeCondition))
        set t = null
        set t = CreateTrigger()
        set LoopCount = 1
        loop
        exitwhen LoopCount > LoopEnd
            call TriggerRegisterDialogEvent(t, dlog)
        set LoopCount = LoopCount + 1
        endloop
        call TriggerAddAction(t, function EndDialog)
        set t = null
    endfunction
    
endscope

Many functions are BJs because i tested should something be BJ...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top