Results 1 to 9 of 9

Thread: Menu Modding - Error Log

  1. #1
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts

    Question Menu Modding - Error Log

    Hello,

    is there a way to test menus by not connecting to my server?
    Currently modify my menus, start a dedicated homeserver, connect and in the clients console the menu errors will show up. However this is really time consuming. Isnt there a way to show the errors in the logfile of the server? The standard menu errors (quickmessage) are shown there too.
    I tried all combinations of developer/script_developer/logfile, but cannot get it to work.
    Im just curious, because Tally mentioned something like that here:
    http://killtube.org/showthread.php?1...-in-menu-files!

    I've already contacted him, unfortunately he isnt into cod modding at this time and cant tell me his setup un detail. Anyway, thanks Tally for your quick answer!

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    What happens when you put it in the ui_mp folder instead of the scriptmenus folder?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Did some testings:
    • in cod2/ui_mp/ingame.txt i added the entry loadMenu { "ui_mp/scriptmenus/testmenu.menu" }
    • now its shows a lot of errors, however these aren't correct. it complains about every entry in the menuDef:

      Code:
      Loading 'ui_mp/scriptmenus/testmenu.menu'...
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 13: unknown menu keyword name
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 14: unknown menu keyword testmenu
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 14: unknown menu keyword rect
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 14: unknown menu keyword 0
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 14: unknown menu keyword 0
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 14: unknown menu keyword 640
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 14: unknown menu keyword 480
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 15: unknown menu keyword focuscolor
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 15: unknown menu keyword .98
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 15: unknown menu keyword .827
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 15: unknown menu keyword .58
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 15: unknown menu keyword 1
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 16: unknown menu keyword style
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 16: unknown menu keyword 0
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 17: unknown menu keyword blurWorld
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 17: unknown menu keyword 5.0
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 18: unknown menu keyword onEsc
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 19: unknown menu keyword {
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 20: unknown menu keyword close
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 20: unknown menu keyword testmenu
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 20: unknown menu keyword ;
      Menu load error: ui_mp/scriptmenus/testmenu.menu, line 21: menu has no name
    • with my testmenu.menu as follow:

      Code:
      #include "ui_mp/menudef.h"
      
      #define ORIGIN_TITLE			80 64
      #define ORIGIN_AUTOASSIGN		80 80
      #define ORIGIN_ALLIES			80 100
      #define ORIGIN_AXIS			80 120
      #define ORIGIN_SPECTATOR		80 140
      #define ORIGIN_BACK			80 165
      
      {
      	menuDef
      	{
      		name			testmenu
      		rect			0 0 640 480
      		focuscolor		GLOBAL_FOCUSED_COLOR
      		style			WINDOW_STYLE_EMPTY
      		blurWorld		5.0
      		onEsc
      		{
      			close testmenu;
      		}
      		onClose
      		{
      
      		}
      
      		itemDef 
      		{
      			name			"button_back"
      			visible		1
      			rect			0 0 128 24
      			origin			ORIGIN_BACK
      			forecolor		GLOBAL_UNFOCUSED_COLOR
      			type			ITEM_TYPE_BUTTON
      			text			"@Back"
      			textfont		UI_FONT_NORMAL
      			textscale		0.33
      			textaligny		20
      			textalignx		128
      			textalign		ITEM_ALIGN_RIGHT
      			action
      			{
      				play "mouse_click";
      				close testmenu;
      				open ingame;
      			}
      			onFocus
      			{
      				play "mouse_over";
      			}
      		}
      	}
      }
    • when i add some non existent menus the console doesnt complain:

      Code:
      {	
       	loadMenu { "ui_mp/ingame.menu" } // THERE IS NO UI_MP/INGAME.MENU!!!!!!!!!!!!!!
      	loadMenu { "ui_mp/ingame_controls.menu" }
      	loadMenu { "ui_mp/ingame_options.menu" }		// loadMenu { "ui_mp/ingame_options.menu" }
      	loadMenu { "ui_mp/ingame_system.menu" }		// loadMenu { "ui_mp/ingame_system.menu" }
      	loadMenu { "ui_mp/ingame_leave.menu" }
      	loadMenu { "ui_mp/ingame_callvote.menu" }
      
      	loadMenu { "ui_mp/wm_quickmessage.menu" }
      
      	loadMenu { "ui_mp/scriptmenus/testmenu.menu" }
      	loadMenu { "ui_mp/scriptmenus/ingame.menu" } // INGAME.MENU IS IN SCRIPTMENUS SUBDIR!!!!! NOW CONSOLE COMPLAINS THE SAME AS IN MY TESTMENU
       	loadMenu { "ui_mp/I_DO_NOT_EXIST.menu" }
      }
      Code:
      Menu load error: ui_mp/scriptmenus/ingame.menu, line 21: menu has no name
      	Loading 'ui_mp/I_DO_NOT_EXIST.menu'...
      ------- Game Initialization -------


    Well, where do I fail here?

  4. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Don't put your menu in the scriptmenus folder. loadMenu{} is a method to load a menu which otherwise could not be precached. Do not use it on script menus.

    If you put a menu in scriptmenus folder, precache it via the normal method in a gsc file.
    Last edited by Tally; 26th April 2014 at 13:04.

  5. #5
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    I don't know what here is wrong

    But should be that the mistake?

    Code:
    		name			testmenu
    should be to

    Code:
    		name			"testmenu"

  6. #6
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    I'd like to test menus that are precached and can do a response -> scriptmenus.
    However I failed to get error messages shown on such menus without having a client (me) connecting to the server.

    @Loveboy:
    There are 3 types of menu variables: numbers, strings and items.
    The parameter 'name' is an item its contents can be either an item or a string.
    Strings and items are handles in a similar way, there are only a few differences.
    Stock CoD2 menus using items not strings as name parameter

  7. The Following User Says Thank You to serthy For This Useful Post:

    RobsoN (26th April 2014)

  8. #7
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    ui_mp/hud.txt ui_mp/menus.txt and ui_mp/ingame.txt need to be in an *.iwd container to get loaded.
    ui_mp and ui_mp/scriptmenus can remain in the main directory for testing.
    just in case somebody needs this later

  9. #8
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    About the errors you saw: I saw this too in 1.2 with the qm menu, errors dont show at map_rotate iirc
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  10. #9
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Loveboy View Post
    I don't know what here is wrong

    But should be that the mistake?

    Code:
    		name			testmenu
    should be to

    Code:
    		name			"testmenu"
    I'll add a couple of notes to this - You can do itemDef{} names either as a string or without the quote marks. In fact, you don't need a name for an itemDef{} unless you are hiding/showing the item via code. The only time a name is essential is with a menudef{} and it must be a string. Menus are precached by this name and if it is missing you will get a script compile error and your server wont start.

  11. The Following User Says Thank You to Tally For This Useful Post:

    Loveboy (27th April 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •