Results 1 to 2 of 2
  1. #1
    Join Date
    May 2010

    Create new channel

    Hello @all,
    im new in c++ and im using the TS3 SDK to create new channels but it doesn't work.

    If i call the function "createchannel" with all arguments for the function ill get the following error: "Setting invalid flag in setChannelVariablesAsInt", Error creating channel: 1538.

    Here is a snipped of the code that i use:

    #define CHECK_ERROR(x) if((error = x) != ERROR_ok) { goto on_error; }
    int createChannel(uint64 scHandlerID, uint64 parentChannelID, const char* name, const char* topic, const char* description, const char* password, int codec, int codecQuality, int maxClients, int familyMaxClients, int order, int perm, int semiperm, int default_new){
    	unsigned int error;
    	CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_NAME,name));
    	CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_TOPIC, topic));
    	CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_DESCRIPTION, description));
    	CHECK_ERROR(ts3client_setChannelVariableAsString(scHandlerID, 0, CHANNEL_PASSWORD, password));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_CODEC, codec));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_CODEC_QUALITY, codecQuality));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_MAXCLIENTS, maxClients));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_MAXFAMILYCLIENTS, familyMaxClients));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_ORDER, order));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_FLAG_PERMANENT, perm));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_FLAG_SEMI_PERMANENT, semiperm));
    	CHECK_ERROR(ts3client_setChannelVariableAsInt   (scHandlerID, 0, CHANNEL_FLAG_DEFAULT, default_new));
    	  /* Flush changes to server */
    	CHECK_ERROR(ts3client_flushChannelCreation(scHandlerID, parentChannelID));
    	return 0;  /* Success */
    	printf("Error creating channel: %d\n", error);
    	return 1;  /* Failure */
    To call the function i use this:

    It would be nice if someone can help me to fix this problem.

    Big thanks.

    See Ya!

  2. #2
    Join Date
    June 2011

    I did the test and it didn't worked also, BUT
    just comment the line where you set the order variable and it will work.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to create a channel that create sup channel on join?
    By ThunderNRW in forum Server Support
    Replies: 0
    Last Post: June 1st, 2015, 10:00 PM
  2. [Not possible] Restrict server group to create sub channel in one channel only
    By MicPawnage in forum Permission System
    Replies: 4
    Last Post: August 9th, 2014, 01:43 PM
  3. Replies: 4
    Last Post: December 14th, 2013, 09:17 PM
  4. Replies: 9
    Last Post: November 27th, 2013, 09:53 AM

Posting Permissions

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