• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[vJASS] Multiboard item isn't updated?

Status
Not open for further replies.
Level 15
Joined
Nov 30, 2007
Messages
1,202
Basically I want the str of below one to replace the above one....

JASS:
set i = 0
            loop
                exitwhen i == BOARD_ROWS - 1
                set .str[i] = .str[i + 1]
                call MultiboardSetItemValue(.mbi[i], .str[i])
                call MultiboardReleaseItem(.mbi[i])
                set i = i + 1
            endloop
            set i = 0
            loop
                exitwhen i == BOARD_ROWS - 1 
                call BJDebugMsg(.str[i]) 
                set i = i + 1
            endloop

The new order displays properly in DebugMsg format but the multiboard doesn't change?? However when I change into this it works:
JASS:
method addString takes ChatString msg, boolean flag returns nothing 
            local integer i
            local integer k = 0
            loop    
                set i = 0
                loop
                    exitwhen i == BOARD_ROWS - 1
                    set .str[i] = .str[i + 1]
                    set i = i + 1
                endloop
                set str[BOARD_ROWS - 1] = msg.line[k]
                set i = 0
                loop
                    exitwhen i == BOARD_ROWS  
                    call MultiboardSetItemValueBJ(.mb, 1, i + 1, str[i])
                    set i = i + 1
                endloop
                exitwhen k == msg.n
                set k = k + 1
            endloop
        endmethod
    endstruct
 
Last edited:
Level 13
Joined
May 11, 2008
Messages
1,198
I do not understand multiboards very well myself. I would suggest for you to use the jBoard by Magentix. You can find an example of it in both my maps, TDHT and TAF. I'll be releasing a newer version of TDHT soon, but in the meantime I would recommend that map's code since the only online version of TAF available needs a lot of cleanup.
 
Status
Not open for further replies.
Top