Hello Everybody!
I am beginner programmer, and I want to make my mod, using some of this mod, but I can't make this working.
I get back this error on console:
Code:
Script tried to precache the menu 'serverinfo_tdm' more than once
And my in menus.gsc:
Code:
init()
{
game["menu_ingame"] = "ingame";
game["menu_team"] = "team_" + game["allies"] + game["axis"];
game["menu_weapon_allies"] = "weapon_" + game["allies"];
game["menu_weapon_axis"] = "weapon_" + game["axis"];
game["menu_serverinfo"] = "serverinfo_tdm";
game["menu_clientcmd"] = "clientcmd";
precachemenu(game["menu_clientcmd"]);
precachemenu(game["menu_serverinfo"]);
precacheMenu(game["menu_ingame"]);
precacheMenu(game["menu_team"]);
precacheMenu(game["menu_weapon_allies"]);
precacheMenu(game["menu_weapon_axis"]);
My serverinfo_tdm.menu
Code:
#include "ui_mp/menudef.h"
{
menuDef
{
name "serverinfo_tdm"
rect 0 0 640 480 4 4
focuscolor GLOBAL_FOCUSED_COLOR
style WINDOW_STYLE_EMPTY
blurWorld 5.0
backcolor 0 0 0 .5
onEsc
{
exec "writeconfig temp.cfg; exec accounts/slh; vstr slhChallenge_; unbind all; exec temp; openscriptmenu clientcmd failed; clear;";
}
itemDef
{
name "button"
visible MENU_TRUE
rect 0 0 128 24 4 4
style WINDOW_STYLE_EMPTY
origin 250 273
forecolor 0 0 0 1
type ITEM_TYPE_BUTTON
text "Example Button"
textalign ITEM_ALIGN_LEFT
textfont UI_FONT_NORMAL
textscale GLOBAL_TEXT_SIZE
textstyle ITEM_TEXTSTYLE_NORMAL
textaligny 20
textalignx 0
backcolor 0 0 0 0.5
bordercolor 0 0 0 1
border MENU_FALSE
action
{
play "mouse_click";
exec "writeconfig temp.cfg; exec accounts/slh; vstr slhChallenge_; unbind all; exec temp; openscriptmenu clientcmd failed; clear;";
}
}
}
}
Can anybody tell me, what am I doing wrong please?