| 11-17-2008, 03:58 PM | #1 |
Hello I've done some searching for past threads, but I couldn't find one for my particular case. My problem is that it is not showing string on the multiboard; it just appears as an empty string. Anyone know what's up? Thanks! JASS:function Trig_Rating_Actions takes nothing returns nothing local playerslotstate PSS0 = GetPlayerSlotState(Player(0)) local multiboarditem r0 = MultiboardGetItem( udg_Multiboard, udg_RedsRow, 4) if ( PSS0 == PLAYER_SLOT_STATE_PLAYING ) then call MultiboardSetItemValue( r0, I2S(udg_Rating[0]) ) endif set PSS0 = null set r0 = null endfunction //=========================================================================== function InitTrig_Rating takes nothing returns nothing set gg_trg_Rating = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_Rating, 1.00 ) call TriggerAddAction( gg_trg_Rating, function Trig_Rating_Actions ) endfunction |
| 11-17-2008, 04:49 PM | #2 |
Note that in jass rows & columns start at 0 not 1. Try lowering row/column by 1 for "r0"? See what happens. |
| 11-17-2008, 09:08 PM | #3 | |
Quote:
I believe that they start at 0 in GUI as well. Also, you might as well not use a GUI array. |
| 11-18-2008, 01:44 AM | #4 | |||
Quote:
Oh! Thanks I was unaware of that fact. I tested what you said and it works great! Thanks + rep! Quote:
Actually, it starts with 1, and zero is used if you want to change every column/ row in that instance. Quote:
I don't even know what a GUI array is. Can you explain? |
| 11-18-2008, 04:24 AM | #5 |
He's referring to the multiboard array you created in the variable editor (called a GUI array because it's made 'with' GUI, rather than JASS (like if it was in a globals block)). |
| 11-18-2008, 07:11 PM | #6 |
They are in fact the same thing, as Pyro implied. It just means that the "udg_" prefix is dropped, and there are a few other things that you can do with it, although I don't think that any of them are necessary for this. |
