ItsMods

Full Version: Menu Problems Halp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Basically, I have a shoutcast overlay i want to reduce in size pending on what the DVAR ui_shoutcast_ax20 is set to... so it looks like this..

ITEM DEF

#define Shoutcast_text(dvar, height, dvarint) \
itemDef \
{ \
name "shoutcast_text" \
type ITEM_TYPE_TEXT \
rect SHOUTCAST_X height dvarint 19 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
exp text( dvarstring( dvar ) ); \
textfont UI_FONT_DEFAULT \
textscale 0.25 \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
visible when( dvarInt( "shoutlol" ) == 1 && dvarString(dvar) != "" ) \
forecolor 1 1 1 1 \
backcolor 0 0.2412 0 0.4975 \
border 1 \
bordersize 1 \
bordercolor CHOICE_BUTTON_BORDER_COLOR_UNSELECTED_RGBA \
}



ACTUAL ITEM

#undef SHOUTCAST_X
#define SHOUTCAST_X 10
Shoutcast_text("ui_shoutcast_ax0", 140, "ui_shoutcast_ax20")





It comes up with the following error though..


Menu load error: ui_mp/hud_spectator.menu, line 218: expected float but found ui_shoutcast_ax20

Menu load error: ui_mp/hud_spectator.menu, line 218: couldn't parse menu item keyword rect
Menu load error: ui_mp/hud_spectator.menu, line 218: couldn't parse menu keyword itemDef








If i change the dvar just to a number, it works, just wondering if there is a way around this at all?
Does the height var work? try (dvar)
nah doesnt matter thats just the variable name i think
i liked the "halp" Troll
we need a fuck off button next to the thank you button..
met helped me out, nm guise.
rect SHOUTCAST_X ( dvarInt ( height ) ) ( dvarInt ( dvarint) ) 19 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \

??
#define Shoutcast_text(dvar1, height1, dvarint1) \
itemDef \
{ \
name "shoutcast_text" \
type ITEM_TYPE_TEXT \
rect SHOUTCAST_X height1 0 16 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP \
exp text( dvarstring( dvar1 ) ) \
exp rect W(dvarstring( dvarint1 )) \
textfont UI_FONT_DEFAULT \
textscale 0.18 \
textalign ITEM_ALIGN_MIDDLE_LEFT \
textstyle ITEM_TEXTSTYLE_SHADOWED \
style WINDOW_STYLE_FILLED \
visible when( dvarInt( "shoutlol" ) == 1 && dvarString(dvar1) != "" ) \
forecolor 1 1 1 1 \
backcolor 0 0.1512 0 0.6975 \
border 1 \
bordersize 1 \
bordercolor CHOICE_BUTTON_BORDER_COLOR_UNSELECTED_RGBA \
}



is right code