Forum

Results 1 to 4 of 4
  1. #1
    Join Date
    April 2018
    Posts
    3

    requestClientMove only returning ERROR_ok

    I'm very new to making Teamspeak plugins and it's all been working fine until I've been trying to use ts3Functions.requestClientMove to move to a channel and edit it if there's no room by editing it but it always seems to return ERROR_ok. What I want is it to either return ERROR_channel_maxfamily_reached or ERROR_channel_maxclients_reached which would make sense for it to do so in my opinion. I'm sure it's my own fault as to why it's only ever returning ERROR_ok even with full channels and I'm just wondering if this issue is only affecting me. While I was very quickly testing it I used this code which never returns anything other than ERROR_ok:
    Code:
    void ts3plugin_onClientMoveMovedEvent(uint64 serverConnectionHandlerID, anyID clientID, uint64 oldChannelID, uint64 newChannelID, int visibility, anyID moverID, const char* moverName, const char* moverUniqueIdentifier, const char* moveMessage) {
    	static anyID me;
    
    	if (ts3Functions.getClientID(serverConnectionHandlerID, &me) != ERROR_ok) {
    		printf("PLUGIN: Error getting clientID.\n");
    		return;
    	}
    		
    	if (clientID == me) {
    
    		if (ts3Functions.requestClientMove(serverConnectionHandlerID, clientID, oldChannelID, "", NULL) != ERROR_ok) {
    			printf("PLUGIN: Error joining channel.\n");
    		}
    		else {
    			printf("PLUGIN: No error joining channel.\n");
    		}
    	}
    
    }
    Thanks for any help and constructive criticism in advance!

  2. #2
    Join Date
    April 2018
    Posts
    3
    After doing further research and looking at some open source projects I've realized that this error is a server error and needs to be handled with onServerErrorEvent. I'm putting this for anyone else who comes across this thread looking for help. Will be learning how to handle these errors now. Thankyou.

  3. #3
    Join Date
    September 2012
    Posts
    6,080
    Any function call that starts with "request" is asynchronous and checks with the server first. Errors that happen on the server side will be given through the onServerErrorEvent. The return value itself is indicating whether or not the call was successfully dispatched to the server and whether to expect an onServerErrorEvent or not.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  4. #4
    Join Date
    April 2018
    Posts
    3
    I was able to successfully implement this event and handle the error. Thanks for the help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Resolved] requestClientMove only on a specified server group
    By NeXuS91 in forum Client Plugins / Lua Scripts
    Replies: 2
    Last Post: December 4th, 2016, 02:57 PM
  2. playWaveFile: ERROR_OK but not playing anything
    By BaumwolleHD in forum Client Plugins / Lua Scripts
    Replies: 1
    Last Post: December 11th, 2015, 02:26 AM
  3. DatabaseQuery CRITICAL ERROR_ok
    By seler in forum Server Support
    Replies: 2
    Last Post: September 24th, 2014, 09:55 PM
  4. PluginSDK getClientID returns ERROR_ok when not connected.
    By SilentStorm in forum Bug Reports [EN/DE]
    Replies: 1
    Last Post: January 26th, 2012, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •