HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Simple Multiboard function

02-09-2009, 09:45 PM#1
Flame_Phoenix
Hey guys, well, not much to say, except I am starting to get really angry with JASS bugs ... today I found one and now i believe this may be the second... anyway, this simple function should create 6 multiboards and show only the first one, but it creates a freak empty multiboard with size 10 or less... I really dunno what could be cause this .. if some one could help I would appreciate:

Collapse JASS:
globals
//multiboards
        private constant integer COLS = 1
        private constant integer ROWS = 1
        private constant string TITLE = "Choose your Race"
        private constant string COLUMN_TITLE = "Race Description"
endglobals
 private function setMultiboards takes nothing returns nothing
        local integer i = 0
        
        loop 
            exitwhen (i > 5)
            
            //creating the multiboards for all the races
            set RaceMultiboards[i] = CreateMultiboardBJ(COLS, ROWS, TITLE)
            call MultiboardSetItemValueBJ(RaceMultiboards[i], 1, 1, COLUMN_TITLE)
            call MultiboardSetItemStyleBJ(RaceMultiboards[i], 1, 1, true, false )
            call MultiboardSetItemWidthBJ(RaceMultiboards[i], 1, 1, 150.0 )
            
            set i = i + 1
        endloop
        
        //the description of the races
        call MultiboardSetItemValueBJ( RaceMultiboards[0], 1, 1, HUMAN_DESC )
        call MultiboardSetItemValueBJ( RaceMultiboards[1], 1, 1, ORC_DESC )
        call MultiboardSetItemValueBJ( RaceMultiboards[2], 1, 1, UNDEAD_DESC )
        call MultiboardSetItemValueBJ( RaceMultiboards[3], 1, 1, NIGHT_ELF_DESC )
        call MultiboardSetItemValueBJ( RaceMultiboards[4], 1, 1, HIGH_ELF_DESC )
        call MultiboardSetItemValueBJ( RaceMultiboards[5], 1, 1, CHAOS_ORC_DESC )
        
        call MultiboardDisplay(RaceMultiboards[0], true)
    endfunction
02-10-2009, 10:42 PM#2
Anitarf
Do you call this function at map initialization?
02-11-2009, 12:55 AM#3
Veev
Hide the multiboards right after you create them (inside the loop) and then show it (outside the loop). I've had this problem before and this fixed it for me.
02-11-2009, 08:43 AM#4
Flame_Phoenix
Quote:
Do you call this function at map initialization?
yes, when the game time is 0.1 (i use a timer)

Quote:
Hide the multiboards right after you create them (inside the loop) and then show it (outside the loop). I've had this problem before and this fixed it for me.
Will try it soon thx =)