Welkom bij Emps-World!

Registreer je nu om toegang te krijgen tot al onze forumfuncties. Zodra je bent geregistreerd en ingelogd, kun je onderwerpen aanmaken, reacties plaatsen, privéberichten sturen, je profiel beheren, met andere spelers chatten in de shoutbox en nog veel meer. Zodra je inlogt, verdwijnt dit bericht.

Pagina's: 1

Jp

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

Mary

Reageren #1 · Augustus 11, 2016, 08:47:27 pm
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

Reageren #2 · Augustus 11, 2016, 10:39:42 pm
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
 
De volgende gebruikers vonden dit bericht leuk: Just Humen, Ranger 0wns

Mary

Reageren #3 · Augustus 12, 2016, 12:47:19 am
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

Reageren #4 · Augustus 12, 2016, 02:30:18 pm
The way java handles regexes is a bit exotic. I can just use replaceFirst with a simple string though. Thanks jonneh. :)
 
Pagina's: 1