Sveiki atvykę į Emps-World!

Užsiregistruok dabar, kad gautum prieigą prie visų mūsų forumo funkcijų. Kai užsiregistruosi ir prisijungsi, galėsi kurti temas, rašyti atsakymus, siųsti privačias žinutes, tvarkyti savo profilį, bendrauti su kitais žaidėjais pokalbių lange ir dar daugiau. Kai prisijungsi, ši žinutė išnyks.

Puslapiai: 1

Jp

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

Mary

Atsakyti #1 · Rugpjūtis 11, 2016, 08:47:27 popiet
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

Atsakyti #2 · Rugpjūtis 11, 2016, 10:39:42 popiet
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
 
Šis naudotojams patiko šis įrašas: Just Humen, Ranger 0wns

Mary

Atsakyti #3 · Rugpjūtis 12, 2016, 12:47:19 priešpiet
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

Atsakyti #4 · Rugpjūtis 12, 2016, 02:30:18 popiet
The way java handles regexes is a bit exotic. I can just use replaceFirst with a simple string though. Thanks jonneh. :)
 
Puslapiai: 1