• 🏆 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!

[Trigger] Multiboard

Status
Not open for further replies.
Hey guys im back agian,
i've spent the last 3 hours working on this i had it working fine for 1 player. now i am in need of making it for loads of different players, however its a personal multiboard.

Whenever i try tihs it either,
Creates the multiboard but messed up, first row is fine, but others have messed up text and icons are not shown proper.
Or it just ends up crashing the editor.

Heres the code: (very long i know :L)
  • Setup
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • For each (Integer CurrentPlayer) from 0 to 11, do (Actions)
        • Loop - Actions
          • -------- Creating the multiboard (Firstly set the name) --------
          • Multiboard - Create a multiboard with 6 columns and 6 rows, titled ((Name of (Player((Integer A)))) + ('s + Skills))
          • Set Skillsboard[(Integer A)] = (Last created multiboard)
          • -------- Set Text (Rows) --------
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 1 to Attack
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 2 to Strength
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 3 to Defence
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 4 to Range
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 5 to Prayer
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 6 to Magic
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 1 to Hitpoints
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 2 to Agility
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 3 to Herblore
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 4 to Thieving
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 5 to Crafting
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 6 to Fletching
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 1 to Mining
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 2 to Smithing
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 3 to Fishing
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 4 to Cooking
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 5 to Firemaking
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 6 to Woodcutting
          • -------- Show Icons/Add Icons --------
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 1 to war3mapImported\attack.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 2 to war3mapImported\Strength.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 3 to war3mapImported\Defence.blp
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 4 to war3mapImported\Range.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 5 to war3mapImported\Prayer.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 6 to war3mapImported\Mage.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 1 to war3mapImported\Hitpoints.blp
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 2 to war3mapImported\Agility.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 3 to war3mapImported\Herblore.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 4 to war3mapImported\Thieving.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 5 to war3mapImported\Crafting.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 6 to war3mapImported\Fletching.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 1 to war3mapImported\Mining.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 2 to war3mapImported\Smithing.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 3 to war3mapImported\Fishing.blp
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 4 to war3mapImported\Cooking.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 5 to war3mapImported\Firemaking.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 6 to war3mapImported\Woodcuting.BLP
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 1, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Skillsboard[(Integer A)] item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 2, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 2, row (Integer A) to 1/1
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 3, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Skillsboard[(Integer A)] item in column 4, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 4, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 4, row (Integer A) to 1/1
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to 10/10
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 5, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Skillsboard[(Integer A)] item in column 6, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 6, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 6, row (Integer A) to 1/1
          • Multiboard - Hide Skillsboard[(Integer A)]
          • Custom script: if (GetLocalPlayer() == Player(udg_CurrentPlayer)) then
          • Multiboard - Show Skillsboard[(Integer A)]
          • Custom script: endif
Thankyou,
evilcrizpy.
 
Change this:
  • For each (Integer CurrentPlayer) from 0 to 11, do (Actions)
To this:
  • For each (Integer A) from 0 to 11, do (Actions)
And then add this in the loop:
  • Loop - Actions
    • Set CurrentPlayer = (CurrentPlayer + 1)
And then try it. :)

When you specify a variable for looping aside from IntegerA/IntegerB, it will increment/decrement that variable instead, and integerA/integerB will always return 0. Because you can't directly increment Integer A, might as well directly increment the one you can (CurrentPlayer) and then have the loop increment Integer A itself. :D
 
Change this:
  • For each (Integer CurrentPlayer) from 0 to 11, do (Actions)
To this:
  • For each (Integer A) from 0 to 11, do (Actions)
And then add this in the loop:
  • Loop - Actions
    • Set CurrentPlayer = (CurrentPlayer + 1)
And then try it. :)

When you specify a variable for looping aside from IntegerA/IntegerB, it will increment/decrement that variable instead, and integerA/integerB will always return 0. Because you can't directly increment Integer A, might as well directly increment the one you can (CurrentPlayer) and then have the loop increment Integer A itself. :D


Hmmm thank,
but it just keeeps crashing still :/ getting that stupid fatal errror.
 
Ermmm the above trigger is unupdated here we are.
  • Setup
    • Events
      • Time - Elapsed game time is 0.03 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 0 to 11, do (Actions)
        • Loop - Actions
          • Set CurrentPlayer = (CurrentPlayer + 1)
          • -------- Creating the multiboard (Firstly set the name) --------
          • Multiboard - Create a multiboard with 6 columns and 6 rows, titled ((Name of (Player((Integer A)))) + ('s + Skills))
          • Set Skillsboard[(Integer A)] = (Last created multiboard)
          • -------- Set Text (Rows) --------
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 1 to Attack
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 2 to Strength
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 3 to Defence
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 4 to Range
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 5 to Prayer
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 6 to Magic
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 1 to Hitpoints
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 2 to Agility
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 3 to Herblore
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 4 to Thieving
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 5 to Crafting
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 6 to Fletching
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 1 to Mining
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 2 to Smithing
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 3 to Fishing
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 4 to Cooking
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 5 to Firemaking
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 6 to Woodcutting
          • -------- Show Icons/Add Icons --------
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 1 to war3mapImported\attack.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 2 to war3mapImported\Strength.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 3 to war3mapImported\Defence.blp
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 4 to war3mapImported\Range.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 5 to war3mapImported\Prayer.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 6 to war3mapImported\Mage.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 1 to war3mapImported\Hitpoints.blp
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 2 to war3mapImported\Agility.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 3 to war3mapImported\Herblore.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 4 to war3mapImported\Thieving.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 5 to war3mapImported\Crafting.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 6 to war3mapImported\Fletching.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 1 to war3mapImported\Mining.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 2 to war3mapImported\Smithing.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 3 to war3mapImported\Fishing.blp
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 4 to war3mapImported\Cooking.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 5 to war3mapImported\Firemaking.BLP
          • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 6 to war3mapImported\Woodcuting.BLP
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 1, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Skillsboard[(Integer A)] item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 2, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 2, row (Integer A) to 1/1
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 3, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Skillsboard[(Integer A)] item in column 4, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 4, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 4, row (Integer A) to 1/1
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to 10/10
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 5, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Skillsboard[(Integer A)] item in column 6, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 6, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 6, row (Integer A) to 1/1
          • Multiboard - Hide Skillsboard[(Integer A)]
          • Custom script: if (GetLocalPlayer() == Player(udg_CurrentPlayer)) then
          • Multiboard - Show Skillsboard[(Integer A)]
          • Custom script: endif
Hmmmm well if localplayer causes the crash :/ is their a way round it/
Edit :
I have got it to display, however it does not set the width,display style and texts. after the creation properly.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Players in GUI are from 1 to 12. In JASS they are from 0 to 11.

When Integer A is 0, this will bug
  • (Name of (Player((Integer A))
since there is no Player(0) in GUI.

This will work, since there is Player(0) in JASS
  • Custom script: if (GetLocalPlayer() == Player(udg_CurrentPlayer)) then
However your first player is Player(1), which is player 2 actually. So it doesn't run for P1.

You can loop from 1 to 12. Make this the last action in the loop: Set CurrentPlayer = (CurrentPlayer + 1). Then it should work.
 
Okay well, i fixed the problem.
However the first row is fine, and the mutliboard is shown
bUt the other rows are messed up, widths not set, icons or texts properly
here is the new trigger

  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Wait 0.03 seconds
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • -------- Creating the multiboard (Firstly set the name) --------
          • Multiboard - Create a multiboard with 6 columns and 6 rows, titled ((Name of (Player((Integer A)))) + ('s + Skills))
          • Set Skillsboard[(Integer A)] = (Last created multiboard)
          • Multiboard - Hide Skillsboard[(Integer A)]
          • Wait 0.03 seconds
          • For each (Integer A) from 1 to 10, do (Actions)
            • Loop - Actions
              • Set CurrentPlayer = (CurrentPlayer + 1)
              • -------- Set Text (Rows) --------
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 1 to Attack
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 2 to Strength
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 3 to Defence
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 4 to Range
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 5 to Prayer
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 1, row 6 to Magic
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 1 to Hitpoints
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 2 to Agility
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 3 to Herblore
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 4 to Thieving
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 5 to Crafting
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 3, row 6 to Fletching
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 1 to Mining
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 2 to Smithing
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 3 to Fishing
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 4 to Cooking
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 5 to Firemaking
              • Multiboard - Set the text for Skillsboard[(Integer A)] item in column 5, row 6 to Woodcutting
              • -------- Show Icons/Add Icons --------
              • For each (Integer A) from 1 to 10, do (Actions)
                • Loop - Actions
                  • Multiboard - Set the icon for Skillsboard[CurrentPlayer] item in column 1, row 1 to war3mapImported\attack.BLP
                  • Multiboard - Set the icon for Skillsboard[CurrentPlayer] item in column 1, row 2 to war3mapImported\Strength.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 3 to war3mapImported\Defence.blp
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 4 to war3mapImported\Range.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 5 to war3mapImported\Prayer.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 1, row 6 to war3mapImported\Mage.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 1 to war3mapImported\Hitpoints.blp
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 2 to war3mapImported\Agility.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 3 to war3mapImported\Herblore.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 4 to war3mapImported\Thieving.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 5 to war3mapImported\Crafting.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 3, row 6 to war3mapImported\Fletching.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 1 to war3mapImported\Mining.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 2 to war3mapImported\Smithing.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 3 to war3mapImported\Fishing.blp
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 4 to war3mapImported\Cooking.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 5 to war3mapImported\Firemaking.BLP
                  • Multiboard - Set the icon for Skillsboard[(Integer A)] item in column 5, row 6 to war3mapImported\Woodcuting.BLP
              • -------- Set Widths --------
              • For each (Integer A) from 1 to 10, do (Actions)
                • Loop - Actions
                  • Multiboard - Set the width for Skillsboard[(Integer A)] item in column 1, row (Integer A) to 5.00% of the total screen width
                  • Multiboard - Set the display style for Skillsboard[CurrentPlayer] item in column 2, row CurrentPlayer to Show text and Hide icons
                  • Multiboard - Set the width for Skillsboard[CurrentPlayer] item in column 2, row CurrentPlayer to 2.00% of the total screen width
                  • Multiboard - Set the text for Skillsboard[CurrentPlayer] item in column 2, row CurrentPlayer to 1/1
                  • Multiboard - Set the width for Skillsboard[CurrentPlayer] item in column 3, row CurrentPlayer to 5.00% of the total screen width
                  • Multiboard - Set the display style for Skillsboard[CurrentPlayer] item in column 4, row CurrentPlayer to Show text and Hide icons
                  • Multiboard - Set the width for Skillsboard[CurrentPlayer] item in column 4, row CurrentPlayer to 2.00% of the total screen width
                  • Multiboard - Set the text for Skillsboard[CurrentPlayer] item in column 4, row CurrentPlayer to 1/1
                  • Multiboard - Set the text for Skillsboard[CurrentPlayer] item in column 4, row 1 to 10/10
                  • Multiboard - Set the width for Skillsboard[CurrentPlayer] item in column 5, row CurrentPlayer to 5.00% of the total screen width
                  • Multiboard - Set the display style for Skillsboard[CurrentPlayer] item in column 6, row CurrentPlayer to Show text and Hide icons
                  • Multiboard - Set the width for Skillsboard[CurrentPlayer] item in column 6, row CurrentPlayer to 2.00% of the total screen width
                  • Multiboard - Set the text for Skillsboard[CurrentPlayer] item in column 6, row CurrentPlayer to 1/1
              • Multiboard - Hide Skillsboard[(Integer A)]
              • Custom script: if (GetLocalPlayer() == Player (udg_CurrentPlayer -1) ) then
              • Multiboard - Show Skillsboard[CurrentPlayer]
              • Custom script: endif
 
Remove the wait inside the loop, it serves no purpose. Don't use integer A loop inside integer A loop.

Current player will be 100 at the end of the trigger for example, you're using the loops wrong. You don't need own loop for show icons/Add icons.

How about if i move the loops out of the other loops, would this work?
 
The wait was needed afterall, since the thread was hitting the operation limit. Make sure you're not using Integer A or Integer B with anything else while the trigger runs.

Test without the custom scripts enabled.

So should it work now?
Thanks for your help,
yesss the multiboard works, but how am i going to get it to work with seperate users :/
 
Status
Not open for further replies.
Top