Willkommen bei Emps-World!

Registriere dich jetzt, um Zugriff auf alle unsere Forenfunktionen zu erhalten. Sobald du registriert und angemeldet bist, kannst du Themen erstellen, auf Beiträge antworten, private Nachrichten senden, dein Profil verwalten, in der Shoutbox mit anderen Spielern chatten und vieles mehr. Sobald du dich anmeldest, verschwindet diese Nachricht.

Seiten: 1

Jp

August 11, 2016, 07:33:52 nachm.
Can't type / in clan chats.
I.e typing 1/100 comes up as 1100.

Mary

Antworten #1 · August 11, 2016, 08:47:27 nachm.
obviously, since / counts as the start of a line in clan chat all / get negated

idk if theres a way around but ill leave your report here in case there is.
 

Jonneh

Antworten #2 · August 11, 2016, 10:39:42 nachm.
obviously, since / counts as the start of a line in clan chat all / get negated

idk if theres a way around but ill leave your report here in case there is.

message.replaceFirst("^/", ""); instead of message.replace("/", "");
ignore acc pls
 
Folgenden Benutzern gefiel dieser Beitrag: Just Humen, Ranger 0wns

Mary

Antworten #3 · August 12, 2016, 12:47:19 vorm.
obviously, since / counts as the start of a line in clan chat all / get negated

idk if theres a way around but ill leave your report here in case there is.

message.replaceFirst("^/", ""); instead of message.replace("/", "");
errors (illegal/unsupported escape sequence/@not null string regex)

   public String serialize() {
      return "{\"clan\":\"" + clan + "\",\"from\":\"" + from + "\",\"message\":\"" + message.replace("\\", "/").replace("\"", "\\\"") + "\"}";
   }

this' used for clanchat ._.
 

Thomy

Antworten #4 · August 12, 2016, 02:30:18 nachm.
The way java handles regexes is a bit exotic. I can just use replaceFirst with a simple string though. Thanks jonneh. :)
 
Seiten: 1