Raised This Month: $51 Target: $400
 12% 

Menu title allowed characters


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-23-2018 , 15:13   Menu title allowed characters
Reply With Quote #1

Hi,

are there any documented restrictions for characters set for menu title?

"[" character in SetMenuTitle causes menu is not appear in the screen. No errors in logfile.

Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

public void OnPluginStart()
{
	RegConsoleCmd("menu_test", ShowMenu);
}

public Action ShowMenu(int client, int args)
{
	Menu menu = CreateMenu(ShowMenuHandler, MENU_ACTIONS_DEFAULT);
	menu.SetTitle("[HSCoins]");
//	menu.SetTitle("HSCoins]");
	menu.AddItem("alias", "name");
	menu.Display(client, MENU_TIME_FOREVER);
	return Plugin_Handled;
}

public int ShowMenuHandler(Menu menu, MenuAction action, int param1, int param2)
{
	switch (action)
	{
		case MenuAction_End:
			CloseHandle(menu);
	}
}

/*
public Action ShowMenu(int client, int args)
{
	Handle menu = CreateMenu(ShowMenuHandler, MENU_ACTIONS_DEFAULT);
//	SetMenuTitle(menu, "[HSCoins]");
	SetMenuTitle(menu, "HSCoins]");
	AddMenuItem(menu, "alias", "name");
	DisplayMenu(menu, client, MENU_TIME_FOREVER);
	return Plugin_Handled;
}

public int ShowMenuHandler(Handle menu, MenuAction action, int param1, int param2)
{
	switch (action)
	{
		case MenuAction_End:
			CloseHandle(menu);
	}
}
*/
SM v.1.9.0.6226
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 04-23-2018 , 16:04   Re: Menu title allowed characters
Reply With Quote #2

SM doesn't care about the characters. It's likely to be the game.
Fyren is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-23-2018 , 16:10   Re: Menu title allowed characters
Reply With Quote #3

I tested it in L4d1.

Can anybody confirm the bug in another games?

If it's a common issue, maybe better SM will raise an exception in log for such cases?
I spent a lot of time to find the reason.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 04-23-2018 at 16:11.
Dragokas is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 04-24-2018 , 13:42   Re: Menu title allowed characters
Reply With Quote #4

It's unlikely we'd accept a change to SM to try to deal with something like this, even if it happened on every game. Documenting it isn't a bad idea, but keeping info like that up to date over time is always a problem.
Fyren is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode