| 02-25-2004, 07:02 PM | #1 |
Everytime I put this into my map and save it -- THe WE crashes? Do you see anything wrong with it? :x Code:
function CreateTheMultiboard takes nothing returns nothing
local integer x = 0
local integer y = 0
local integer a = 0
loop
exitwhen x > udg_PlayersAmount
call CreateMultiboardBJ( 13, 8, "Player Chat History" )
set udg_ChatMultiboard[x] = ( GetLastCreatedMultiboard() )
loop
exitwhen y > udg_RowAmount[x]
loop
exitwhen a > 40
if udg_ChatString[a] == "" then
call MultiboardSetItemValue ( 2, a, udg_ChatString[a] )
set a = a + 1
endloop
set y = y + 1
endloop
set x = x + 1
endloop
endfunction |
| 02-25-2004, 08:01 PM | #2 |
you forget an endif. Code:
if udg_ChatString[a] == "" then
call MultiboardSetItemValue ( 2, a, udg_ChatString[a] )
[b]endif[/b] |
| 02-25-2004, 08:01 PM | #3 |
Code:
if udg_ChatString[a] == "" then Code:
endif Code:
native MultiboardSetItemValue takes multiboarditem mbi, string val returns nothing If you rewrite it as Code:
function CreateTheMultiboard takes nothing returns nothing
local integer x = 0
local integer y = 0
local integer a = 0
loop
exitwhen x > udg_PlayersAmount
call CreateMultiboardBJ( 13, 8, "Player Chat History" )
set udg_ChatMultiboard[x] = ( GetLastCreatedMultiboard() )
loop
exitwhen y > udg_RowAmount[x]
loop
exitwhen a > 40
if udg_ChatString[a] == "" then
call MultiboardSetItemValue (udg_ChatMultiboard[x], udg_ChatString[a] )
endif
set a = a + 1
endloop
set y = y + 1
endloop
set x = x + 1
endloop
endfunctionI have seen Pjass crash on similar occasions. It seems that if one forget ssomething fundamentally that Pjass expect, it crashes. |
| 02-25-2004, 08:09 PM | #4 |
That code you posted is also wrong! call MultiboardSetItemValue (udg_ChatMultiboard[x], udg_ChatString[a] ) It expects an Item not a multiboard itself. |
| 02-25-2004, 08:13 PM | #5 |
Ahhh, thx guys. I'm new to JASS >;{ Was told by many JASS is faster and does a lot more things than people say it does. I also noticed that I forgot "BJ" at MultiboardSetItemValue It seems to still crash - and the syntax checker still returns me no syntax error. Gah... New code is... Code:
function CreateTheMultiboard takes nothing returns nothing
local integer x = 0
local integer y = 0
local integer a = 0
loop
exitwhen x > udg_PlayersAmount
call CreateMultiboardBJ( 13, 8, "Player Chat History" )
set udg_ChatMultiboard[x] = ( GetLastCreatedMultiboard() )
loop
exitwhen y > udg_RowAmount[x]
loop
exitwhen a > 40
if udg_ChatString[a] == "" then
call MultiboardSetItemValueBJ ( 2, a, udg_ChatString[a] )
endif
set a = a + 1
endloop
set y = y + 1
endloop
set x = x + 1
endloop
endfunctionAnd I don't get that part where you guys told me about call MultiboardSetItemValueBJ -- so confused |
| 02-25-2004, 08:37 PM | #6 |
You need to be sending MultiboardSetItemBJ a multiboard item this code should work: Code:
function CreateTheMultiboard takes nothing returns nothing
local integer x = 0
local integer y = 0
local integer a = 0
loop
exitwhen x > udg_PlayersAmount
call CreateMultiboardBJ( 13, 8, "Player Chat History" )
set udg_ChatMultiboard[x] = ( GetLastCreatedMultiboard() )
loop
exitwhen y > udg_RowAmount[x]
loop
exitwhen a > 40
if udg_ChatString[a] == "" then
call MultiboardSetItemValueBJ (udg_ChatMultiboard[x], 2, a ,udg_ChatString[a] )
endif
set a = a + 1
endloop
set y = y + 1
endloop
set x = x + 1
endloop
endfunction |
| 02-25-2004, 08:39 PM | #7 |
Oh, coudl've sworn I did that?! But thanks Weaaddar. |
| 02-26-2004, 05:25 PM | #8 |
I just put that code up in my map -- When I call the multiboard to display, it's just this little box with no title and has no rows. Well it has 1 row, but the bottom of it is broken. |
| 02-26-2004, 06:58 PM | #9 |
well syntatically its correct. As far as other stuff I've never liked using mutliboards and I tend to avoid them because they are unituitive. |
| 02-26-2004, 07:07 PM | #10 |
-- I replicated the exact thing in GUI, and still does the same thing, odd... I don't... understand? Do I have to set the item text of every column/row in order for it to display? BTW: Sorry for that douple post up there. |
