iJodix Posted March 28, 2016 Share Posted March 28, 2016 Ok so when i do the following; myPlayer().getName().equals("Bla Bla") It doesn't recognize the name, but when i do any other names without space inside the name like; myPlayer().getName().equals("BlaBla") It works, any ideas what kind of sorcery is this ? Quote Link to comment Share on other sites More sharing options...
AresScripts Posted March 28, 2016 Share Posted March 28, 2016 Try printing out the player name. I doubt it has anything to do with .equals() Quote Link to comment Share on other sites More sharing options...
iJodix Posted March 28, 2016 Author Share Posted March 28, 2016 (edited) Try printing out the player name. I doubt it has anything to do with .equals() I printed it out and there is nothing wrong it it, i just don't understand why the fucking fuck .equals() doesn't like names with spaces in it Edited March 28, 2016 by iJodix Quote Link to comment Share on other sites More sharing options...
FrostBug Posted March 28, 2016 Share Posted March 28, 2016 RS uses "RSString". The spaces are different from regular spaces. If you print the bytes you will see the difference from the version of the name you type out yourself. Replace the special spaces with regular spaces to achieve what you want. 4 Quote Link to comment Share on other sites More sharing options...
Extreme Scripts Posted March 28, 2016 Share Posted March 28, 2016 RS uses "RSString". The spaces are different from regular spaces. If you print the bytes you will see the difference from the version of the name you type out yourself. Replace the special spaces with regular spaces to achieve what you want. Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted March 28, 2016 Share Posted March 28, 2016 Runescape spaces are: https://en.wikipedia.org/wiki/Non-breaking_space 1 Quote Link to comment Share on other sites More sharing options...
hansen19498 Posted March 30, 2016 Share Posted March 30, 2016 好了,所以当我做了以下内容: myPlayer()的getName()。等于(“喇嘛喇嘛”) 它不能识别的名字,但是当我做任何其他的名字没有名称内部空间等; myPlayer()的getName()。等于(“布拉布拉”) 它的工作原理,任何想法是什么样的巫术是什么? If you solve this problem. You can paste a solution, to help other people, including me Quote Link to comment Share on other sites More sharing options...
Psvxe Posted March 30, 2016 Share Posted March 30, 2016 (edited) Actually, I did some debugging myself for fun and I figured out that some names do have normal spaces, or more likely, they don't seem to be non-breaking spaces. [INFO][Bot #1][03/30 09:45:02 AM]: Player : Lil Slurp = Lil Slurp [INFO][Bot #1][03/30 09:45:02 AM]: Player : king ammar x = king ammar x [INFO][Bot #1][03/30 09:45:02 AM]: Player : 66�Atlas�998 = 66�Atlas�998 [INFO][Bot #1][03/30 09:45:02 AM]: Player : Item�Robber = Item�Robber Something is different, no clue what.EDIT: Alright. Itz�PRADA Itz PRADA [INFO][Bot #1][03/30 10:01:06 AM]: Player : Stanklin Stanklin [INFO][Bot #1][03/30 10:01:06 AM]: Player : EpezuWnBnoob EpezuWnBnoob [INFO][Bot #1][03/30 10:01:06 AM]: Player : NatusVincere NatusVincere [INFO][Bot #1][03/30 10:01:06 AM]: Player : JollyJJoker JollyJJoker [INFO][Bot #1][03/30 10:01:06 AM]: Player : Kitten_Dance Kitten_Dance [INFO][Bot #1][03/30 10:01:06 AM]: Player : king ammar x king ammar x [INFO][Bot #1][03/30 10:01:06 AM]: Player : Inneva Inneva [INFO][Bot #1][03/30 10:01:06 AM]: Player : Erza Kagura Erza Kagura [INFO][Bot #1][03/30 10:01:06 AM]: Player : SG Editz SG Editz [INFO][Bot #1][03/30 10:01:06 AM]: Player : Lil Slurp Lil Slurp [INFO][Bot #1][03/30 10:01:06 AM]: Player : mag3king6424 mag3king6424 [INFO][Bot #1][03/30 10:01:06 AM]: Player : 39�Bork�Roc 39 Bork Roc [INFO][Bot #1][03/30 10:01:06 AM]: Player : 54ancient428 54ancient428 Done with the following code for (Player player : ctx.players.getAll()) { if (player != null) { String orginal_name = player.getName().replaceAll("\\u00A0", " "); ctx.log("Player : " + player.getName() + " " + orginal_name); } } \\u00A0Good luck. Edited March 30, 2016 by Psvxe Quote Link to comment Share on other sites More sharing options...
FrostBug Posted March 30, 2016 Share Posted March 30, 2016 Actually, I did some debugging myself for fun and I figured out that some names do have normal spaces, or more likely, they don't seem to be non-breaking spaces. [INFO][Bot #1][03/30 09:45:02 AM]: Player : Lil Slurp = Lil Slurp [INFO][Bot #1][03/30 09:45:02 AM]: Player : king ammar x = king ammar x [INFO][Bot #1][03/30 09:45:02 AM]: Player : 66�Atlas�998 = 66�Atlas�998 [INFO][Bot #1][03/30 09:45:02 AM]: Player : Item�Robber = Item�Robber Something is different, no clue what. Print the bytes Quote Link to comment Share on other sites More sharing options...
Psvxe Posted March 30, 2016 Share Posted March 30, 2016 Print the bytes Edited the post above me. \\u00A0did eventually worked for me to replace the non-breaking space. nbsp; didn't do the job. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted March 30, 2016 Share Posted March 30, 2016 Edited the post above me. \\u00A0did eventually worked for me to replace the non-breaking space. nbsp; didn't do the job. Obviously not :E, " " is the HTML version Quote Link to comment Share on other sites More sharing options...
Psvxe Posted March 30, 2016 Share Posted March 30, 2016 Obviously not :E, " " is the HTML version LOL at those scripters saying to use that. Quote Link to comment Share on other sites More sharing options...