HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

JASS help... plz?

08-07-2003, 09:13 PM#1
Earth-Fury
ok, im i nthe begining stages of learing jass. here is a script i made based on busters multiboard example:
Code:
function Trig_Multiboard_Actions takes nothing returns nothing
    
    local multiboard mb
    local integer rows = 1
    local integer columns = 1

    set mb = CreateMultiboard()

    call MultiboardSetTitleText( mb, "Game Status")

    call MultiboardSetColumnCount( mb, columns)
    call MultiboardSetRowCount ( mb, rows)

    call MultiboardSetItemValue( MultiboardGetItem(mb, 0, 0), "Monsties Remaining")
    call MultiboardSetItemIcon ( MultiboardGetItem(mb, 0, 0), "ReplaceableTextures\\CommandButtons\\BTNZombie.blp")
    call MultiboardSetItemsWidth ( MultiboardGetItem(mb, 0, 0), "200")

    call MultiboardDisplay( mb, true)

endfunction

//===========================================================================
function InitTrig_Multiboard takes nothing returns nothing
    set gg_trg_Multiboard = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Multiboard, 0.00 )
    call TriggerAddAction( gg_trg_Multiboard, function Trig_Multiboard_Actions )
endfunction



now, it dosent work. i knwo what line of code it is, and it seems to be causing logic errors:
Code:
   call MultiboardSetItemsWidth ( MultiboardGetItem(mb, 0, 0), "200")



can ya help me out and tell me why this is happening? thx for any replys.
08-07-2003, 09:33 PM#2
FyreDaug
Firstly, MultiboardSetItemsWidth should be MultiboardSetItemWidth

I donno what else....
08-07-2003, 09:33 PM#3
COOLer
Maybee 200 is too big try smaler number this would not be the first time blizzard forgot to put cap on number and it cause error just like exp dose once you hit level 75 or so.
08-07-2003, 09:37 PM#4
Earth-Fury
nope. i still get this error:
line 54: invalid argument type (string)


page with multiboard code definitions
http://jass.sourceforge.net/doc/api/...ltiboard.shtml
08-07-2003, 09:55 PM#5
Earth-Fury
i got it! u dont define eatch items width, u define a globla width for all items:

Code:
    call MultiboardSetItemsWidth (mb, 0.2)
08-08-2003, 12:03 AM#6
Peppar
Code:
call MultiboardSetItemsWidth ( MultiboardGetItem(mb, 0, 0), "200")
Code:
line 54: invalid argument type (string)
You can't use quotes ("") when you pass a number (an integer or
a real) to a function.
08-08-2003, 12:10 AM#7
Earth-Fury
hmm, cool.

anye know how to remove a button ion a single item but not globaly on the board?