Skip to content

Stringtokenizer Space?

Featured Replies

  • Author

There is a lot easier solution:

<a action="bypass -h npc_%objectId%_test $name1 ¡ $name2 ¡ $name3">

¡ - this is INVERTED EXCLAMATION MARK with C2A1 UTF-8 code. It cannot be wrote by player in game unless he is using programs like adrenaline. There are a lot more characters like this, you can check some UTF-8 table to find some pretty one.

 

Code:

StringTokenizer tk = new StringTokenizer(command, "¡");

You should use .trim() for every token parsed from StringTokenizer so they will not contain spaces.

Did you try it? It's not working + eclipse can't compile this character.

Did you try it? It's not working + eclipse can't compile this character.

use type casting

(char)161

Edited by melron

The bypass command line have limited length. Use RequestBBSwrite packet. He don't have problems with spaces, etc.

Can you give an example or tell us how this one will help this problem?

 

This guy didnt want to cancel the proccess when one more token found , contrary he want the unexpected tokens as one string with spaces inside.

i believe trim is useless, correct me if im wrong

Yes, this will fix the problem.

Example:

TextBox 1: asd

TextBox 2: sss ddd

TextBox 3: ddd 2 uuu

 

Bypass will look like this: "npc_%objectId%_test asd ¡ sss ddd ¡ ddd 2 uuu".

.trim() is needed so spaces at the beginning and at the end of the token will be removed, for example "asd " will be turned into "asd", " sss ddd " into "sss ddd".

  • Author

The bypass command line have limited length. Use RequestBBSwrite packet. He don't have problems with spaces, etc.

And how ill use the bbswrite? Cause i changed bypass to bypass -h still when i write bigger than 15 char in box it no accept it.

And how ill use the bbswrite? Cause i changed bypass to bypass -h still when i write bigger than 15 char in box it no accept it.

 

You need to learn the Community Board style for inputs form. They uses another link style for buttons.

  • Author

You need to learn the Community Board style for inputs form. They uses another link style for buttons.

yea that what im asking lel,, the style in request bypass is example bypass -h blabla

 

in community is ?

yea that what im asking lel,, the style in request bypass is example bypass -h blabla

 

in community is ?

 

Open commynity Mail section and you find the answer. Don't be lazy.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.