It's again me. I'm making menu of weapons and I found a problem. This code works perfect:
But this doesn't work:PHP Code:
#ifndef DRAW_WEAPON_ITEM
#define DRAW_WEAPON_ITEM(_key, _name) \
itemDef \
{ \
name "button_" ## #_name \
visible 1 \
rect ORIGIN_CHOICE ## _key 128 24 \
forecolor GLOBAL_UNFOCUSED_COLOR \
dvar "ui_weapon_" ## #_name \
textfont UI_FONT_NORMAL \
textscale .25 \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textalignx 10 \
textaligny 20 \
action \
{ \
play "mouse_click"; \
scriptMenuResponse "" ## #_name; \
} \
onFocus \
{ \
play "mouse_over"; \
show _name ## _info; \
show weapon_propertiestext; \
} \
}
#endif
DRAW_WEAPON_ITEM(A, m1carbine_mp)
Any ideas, why?PHP Code:
#ifndef DRAW_WEAPON_ITEM
#define DRAW_WEAPON_ITEM(_key, _name) \
itemDef \
{ \
name "button_" ## #_name \
visible 1 \
rect ORIGIN_CHOICE ## _key 128 24 \
forecolor GLOBAL_UNFOCUSED_COLOR \
dvar "ui_weapon_" ## #_name \
textfont UI_FONT_NORMAL \
textscale .25 \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textalignx 10 \
textaligny 20 \
action \
{ \
play "mouse_click"; \
scriptMenuResponse "" ## #_name; \
} \
onFocus \
{ \
play "mouse_over"; \
show _name ## _info; \
show weapon_propertiestext; \
} \
}
#endif
#ifndef DRAW_WEAPON
#define DRAW_WEAPON(_key, _name) \
DRAW_WEAPON_ITEM(_key, _name) \
#endif
DRAW_WEAPON(A, m1carbine_mp)