HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need JASS Help

08-26-2003, 05:36 AM#1
l]arkOne
I have trouble with this line. This is supposed to show the level of the hero gg_unit_N000_0060 in a multiboard.

Everytime I save it say me this line have a Invalid argument type (integer)

call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,2,3),GetHeroLevel(gg_unit_N000_0060))

Can someone correct it for me since im new to this. Tell me if you need more info.

PS: Multiboard own!:D
08-26-2003, 07:52 AM#2
Raptor--
invalid argument on which function?

either MultiboardSetItemValue(), MultiboardGetItem(), or GetHeroLevel() is expecting an integer, and you're not giving it one... i wouldn't be able to say cause i never used multiboards
08-26-2003, 02:15 PM#3
l]arkOne
GetHeroLevel() It must be this one since all other 2 work in other lines.

I dont know what it take more. I dont really want to use a integer variable which check the level of each hero and have the same value as their level. It should take too much time.
08-26-2003, 02:33 PM#4
l]arkOne
I though it was because I didnt wrote the good unit variable(like if I had wrote a non hero unit varriable). But the unit I wrote is a hero. Does it need to be a unit-array varriable to work?

I dont understand what is case sensitive.

Heres the if/then/else which have the error.
-----------------------------------------------
if ( Trig_Normal_Multiboard_Func048C() ) then
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,0),"Kelv")
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,1),I2S(R2I(GetUnitStateSwap(UNIT_STATE_L IFE,gg_unit_H002_0007)))+"/"+I2S(R2I(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,gg_unit_H002_0007))))
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,2),I2S(R2I(GetUnitStateSwap(UNIT_STATE_M ANA,gg_unit_H002_0007)))+"/"+I2S(R2I(GetUnitStateSwap(UNIT_STATE_MAX_MANA,gg_unit_H002_0007))))
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,3),GetHeroLevel(gg_unit_H002_0007))
else <----------error
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,0)," ")
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,1)," ")
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,2)," ")
call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,1,3)," ")
endif
------------------------------------------
I saved again to check and it say the error is the else line. But wtf with integer? and I saved just before adding last line (1,3) and it was ok. So it must be because of GetHeroLevel.

Can someone explain why it highlight else line?

Ho and I have 6 variation(replace 1 by other and change hero name) of this if/then/else and it give me an error to each.
08-26-2003, 03:12 PM#5
l]arkOne
I just did the make a integer-array have the same value as the level and it still show me error.

I dont know what to do at all:(
08-26-2003, 06:54 PM#6
Raptor--
OMG, sorry! uhm, i read it wrong cause i'm used to other languages

its saying you put an invalid integer as an argument, not requesting an integer

MultiboardSetItemValue requires (mbi, string),
you sent it (mbi, integer)

this should fix it

call MultiboardSetItemValue(MultiboardGetItem(udg_global_board,2,3),I2S(GetHeroLevel(gg_unit_N000_0060)))

sorry for wasting you time, i just read it wrong the first time
08-27-2003, 04:29 AM#7
l]arkOne
I got answered at bnet during last night. I didnt know I2S was needed for a single variable(if you see I used it in another line.

Anyway thank for the help:D