TheHolyWaffle / TeamSpeak-3-Java-API

A Java wrapper of TeamSpeak's 3 server query API.
MIT License
306 stars 107 forks source link

Error Connect Query in Server TS #112

Closed Delandilucas closed 8 years ago

Delandilucas commented 8 years ago

Hello, I am unable to connect to TeamSpeak server. Me this error appears on the console:

[2016-07-14 19:30:54.229] < TS3 [2016-07-14 19:30:54.229] < [2016-07-14 19:30:55.518] < Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help " for information on a specific command. [2016-07-14 19:30:55.518] < [2016-07-14 19:30:55.949] > login serveradmin steamwgbrasil [2016-07-14 19:30:56.327] [login] < error id=0 msg=ok [2016-07-14 19:30:56.651] > use [2016-07-14 19:30:57.067] [use] < error id=0 msg=ok [2016-07-14 19:30:57.352] > clientupdate client_nickname=MushTest [2016-07-14 19:30:57.767] [clientupdate] < error id=1024 msg=invalid\sserverID [2016-07-14 19:30:57.769] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [2016-07-14 19:30:58.053] > sendtextmessage targetmode=2 target=0 msg=MushTest\sestá\sonline!! [2016-07-14 19:30:58.468] [sendtextmessage] < error id=1024 msg=invalid\sserverID [2016-07-14 19:30:58.469] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [2016-07-14 19:31:58.297] > whoami [2016-07-14 19:31:58.713] [whoami] < virtualserver_status=unknown virtualserver_unique_identifier virtualserver_port=0 virtualserver_id=0 client_id=0 client_channel_id=0 client_nickname client_database_id=1 client_login_name=serveradmin client_unique_identifier=serveradmin client_origin_server_id=0 [2016-07-14 19:31:58.951] [whoami] < error id=0 msg=ok [2016-07-14 19:32:58.549] > whoami

mohe2015 commented 8 years ago

Most commands require you to select a virtual server. To do so, call either selectVirtualServerByPort(int) or selectVirtualServerById(int). From http://theholywaffle.github.io/TeamSpeak-3-Java-API/1.0.13/com/github/theholywaffle/teamspeak3/TS3Api.html

Please read the javadoc http://theholywaffle.github.io/TeamSpeak-3-Java-API/1.0.13/ and the examples https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API/tree/master/example

The best thing to get started is https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API/blob/master/README.md

PS: You should always provide your code, otherwise it is hard to help you. You can remove private information like your teamspeak ip and your password.

Edit: If you just have a simple question or want to talk to us about something else, feel free to join the repository chat on Gitter. (From https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API/blob/master/README.md)

rogermb commented 8 years ago

Thanks for the quick, correct and detailed answer @mohe2015

Should be resolved, closed.