Forum

Results 1 to 6 of 6
  1. #1
    Join Date
    March 2014
    Posts
    3

    Creating my first TS3 plugin and it won't load

    I compiled the sample plugin and TS3 won't load it for some reason. How can I find out why it's not loading?

    I think these lines are screwing up the loading for me:

    // unsigned int ts3client_getChannelClientList(serverConnectionHan dlerID, channelID, result);
    if ( ts3client_getChannelClientList(serverConnectionHan dlerID, myChannelID, &clientList) != ERROR_ok )
    ts3Functions.logMessage("Error getting client list", LogLevel_INFO, "Plugin", serverConnectionHandlerID);
    // Anther reference unsigned int (*logMessage)(const char* logMessage, enum LogLevel severity, const char* channel, uint64 logID);
    // unsigned int (*requestClientPoke)(uint64 serverConnectionHandlerID, anyID clientID, const char* message, const char* returnCode);
    j = 0;
    while (clientList[j] != 0)
    {
    ts3Functions.requestClientPoke(serverConnectionHan dlerID, clientList[j], "Mission Starting!!!", "");
    ++j;
    }
    ts3client_freeMemory(clientList);

    I believe for some reason ts3client_freeMemory and ts3client_getChannelClientList makes it unloadable. I tried including: "clientlib.h" But again it compiles but doesn't load in TS3.


    With these lines commented, the plugin loads up alright
    Last edited by DrPastah; March 9th, 2014 at 10:56 PM.

  2. #2
    Join Date
    September 2012
    Posts
    6,079
    Seems like you're mixing SDK and PluginSDK.

    ts3client_* is not there in PluginSDK (unless you defined them yourself).

    You should replace "ts3client_" with "ts3Functions."
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  3. #3
    Join Date
    March 2014
    Posts
    3
    Is there a TS3 api call to make a window popup and save a string from the entered input?

  4. #4
    Join Date
    September 2012
    Posts
    6,079
    No as that has nothing to do with TeamSpeak. You need to code any user interface yourself, which includes this popup box to get Input from the user.
    You can use the Qt Framework which has QInputDialog::getText().
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  5. #5
    Join Date
    March 2014
    Posts
    3
    Quote Originally Posted by Chris View Post
    No as that has nothing to do with TeamSpeak. You need to code any user interface yourself, which includes this popup box to get Input from the user.
    You can use the Qt Framework which has QInputDialog::getText().
    Are the users required to install anything?

    Also I'm trying to understand how the TS3Functions struct's member function pointers actually point to the functions?

    #define EXPORTDLL __declspec(dllexport)
    I assume this has something to do with it but I don't see any instances of EXPORTDLL in the TS3Functions struct.


    As well, I want to read VIRTUALSERVER_HOSTBANNER_GFX_URL and VIRTUALSERVER_HOSTBANNER_URL. How do I read these? I want to see the URL of the banner in the server.
    Last edited by DrPastah; March 11th, 2014 at 07:25 PM.

  6. #6
    Join Date
    September 2012
    Posts
    6,079
    Quote Originally Posted by DrPastah View Post
    As well, I want to read VIRTUALSERVER_HOSTBANNER_GFX_URL and VIRTUALSERVER_HOSTBANNER_URL. How do I read these? I want to see the URL of the banner in the server.
    Code:
    char *info;
    if (ts3Functions.getServerVariableAsString(serverConnectionHandlerID, VIRTUALSERVER_HOSTBANNER_URL, &info) == ERROR_ok) {
        // Do something with the Value you retrieved.
        printf("Server Hostbanner URL is %s\n", info);
        ts3Functions.freeMemory(info); // Don't forget to free it, but only do so if the function returned ERROR_ok.
    }
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cant load any plugin
    By ENG_MAC7 in forum Client Plugins / Lua Scripts
    Replies: 1
    Last Post: December 7th, 2014, 04:59 PM
  2. Plugin failed to load
    By Cruz3R in forum Client Plugins / Lua Scripts
    Replies: 1
    Last Post: July 6th, 2014, 12:20 PM
  3. Help, unable to load db plugin lib !
    By abt-network in forum Linux / FreeBSD
    Replies: 4
    Last Post: December 19th, 2010, 07:32 PM
  4. TS Server creating high cpu load
    By Sprenger120 in forum Bug Reports [EN/DE]
    Replies: 9
    Last Post: October 14th, 2010, 07:47 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
  •