Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command Future Error with Sync API? #324

Open
YourGameSpace opened this issue Apr 5, 2019 · 3 comments
Open

Command Future Error with Sync API? #324

YourGameSpace opened this issue Apr 5, 2019 · 3 comments

Comments

@YourGameSpace
Copy link

Hey,

I always get this error when I use "dean" as an argument to this command. For other arguments not ..?! Unfortunately, I do not remember what to do there? thank you in advance

https://i.imgur.com/m45pkky.png (Error)
https://hastebin.com/enobolekuy.cs (Code)

@blombler008
Copy link

blombler008 commented Apr 9, 2019

The message you send if you have no clients found to the pattern is above 1024 characters (every character which need to escape count 2 characters) ... i changed it up so it does what i though you tried to do :)
See here: hastebin.com

@somewhatadev
Copy link
Contributor

When using String.split() I'd recommend to use a RegEx pattern. The following example illustrates how a String with several whitespaces will be split.

String input = "test with    a few white    spaces";
String[] splitWithoutRegEx = input.split(" ");
String[] splitWithRegEx = input.split("\\s+");

Which would result in an output like this:

>> splitWithRegEx:
test
with
a
few
white
spaces

>> splitWithOutRegEx:
test
with



a
few
white



spaces

As you can see, splitWithoutRegEx splits the String at any whitespace. Using a RegEx pattern prevents that from happening since \\s+ splits at one or more whitespaces.

blombler008 added a commit to blombler008/Teamspeak-3-Bot that referenced this issue Apr 11, 2019
@blombler008
Copy link

Better ? 😄 : hastebin.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants