Forum

> > CS2D > Scripts > Escape "|" in menus
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Escape "|" in menus

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Escape "|" in menus

Banaan
User Off Offline

Zitieren
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)?

alt Re: Escape "|" in menus

DC
Admin Off Offline

Zitieren
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 |.

alt Re: Escape "|" in menus

Apache uwu
User Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht