March 28, 20169 yr 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 ?
March 28, 20169 yr Author 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, 20169 yr by iJodix
March 28, 20169 yr 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.
March 28, 20169 yr 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.
March 30, 20169 yr 好了,所以当我做了以下内容: myPlayer()的getName()。等于(“喇嘛喇嘛”) 它不能识别的名字,但是当我做任何其他的名字没有名称内部空间等; myPlayer()的getName()。等于(“布拉布拉”) 它的工作原理,任何想法是什么样的巫术是什么? If you solve this problem. You can paste a solution, to help other people, including me
March 30, 20169 yr 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, 20169 yr by Psvxe
March 30, 20169 yr 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
March 30, 20169 yr 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.
March 30, 20169 yr 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
March 30, 20169 yr Obviously not :E, " " is the HTML version LOL at those scripters saying to use that.
Create an account or sign in to comment