ברוך הבא ל-Emps-World!

הירשם עכשיו כדי לקבל גישה לכל התכונות של הפורום שלנו. לאחר שתירשם ותתחבר, תוכל ליצור נושאים, לפרסם תגובות, לשלוח הודעות פרטיות, לנהל את הפרופיל שלך, לשוחח עם שחקנים אחרים ב-shoutbox ועוד הרבה יותר. לאחר שתתחבר, הודעה זו תיעלם.

עמודים: 1

Jp

אוגוסט 11, 2016, 07:33:52 אחה"צ
Can't type / in clan chats.
I.e typing 1/100 comes up as 1100.

Mary

השב #1 · אוגוסט 11, 2016, 08:47:27 אחה"צ
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

השב #2 · אוגוסט 11, 2016, 10:39:42 אחה"צ
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
 
המשתמשים הבאים סימנו לייק להודעה זו: Just Humen, Ranger 0wns

Mary

השב #3 · אוגוסט 12, 2016, 12:47:19 לפנה"צ
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

השב #4 · אוגוסט 12, 2016, 02:30:18 אחה"צ
The way java handles regexes is a bit exotic. I can just use replaceFirst with a simple string though. Thanks jonneh. :)
 
עמודים: 1