Forum

> > CS2D > Scripts > Escape "|" in menus
Forums overviewCS2D overview Scripts overviewLog in to reply

English Escape "|" in menus

3 replies
To the start Previous 1 Next To the start

old Escape "|" in menus

Banaan
User Off Offline

Quote
Is there any way to escape the "|" character in a menu button?

Suppose there are three players in a server:
1: Player 1
2: Player 2
3: ClanTag | v3rYc00lName

Now if I want to list these three players in a menu:
1
2
3
4
5
6
menu(0, string.format("Title,%s|ID 1,%s|ID 2,%s|ID 3",
		player(1, "name"),
		player(2, "name"),
		player(3, "name")
	)
)

The result would be

Title
Player 1          ID 1
Player 2          ID 2
ClanTag          v3rYc00lName


So the name of the third player is used as 'extra information', while the real extra information is lost.

Is there any way to fix this (apart from modifying the name)?

old Re: Escape "|" in menus

DC
Admin Off Offline

Quote
no, sorry. escaping is not supported in the menu command (I should probably make it possible...). you could replace | with ¦. not perfect but better than completely removing the |.

old Re: Escape "|" in menus

Apache uwu
User Off Offline

Quote
Oh and is it also possible to escape '(' and ')'?

Example:

1: Player 1
2: Player 2
3: (Player 3)

1
menu(1,player(1,"name")..","..player(2,"name")..","..player(3,"name"))

Button 3 would be disabled.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview