Forum

Page 2 of 5 FirstFirst 1234 ... LastLast
Results 16 to 30 of 66
  1. #16
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    I use Codeblocks.

    Never needed compiler commands as of yet though, so I'll try compiling with
    "-shared" asaic

    And I also am not sure which type I use. I think I went with blank project...

    So the plugin is a DLL not an EXE?
    And the client calls the functions from every dll?
    What if I need to use external packages too in order for my plugin to work properly?

  2. #17
    Join Date
    September 2012
    Posts
    6,080
    define "external packages" please.
    If you mean your plugin links against third party dynamic libraries you have to ship them with your plugin in a subfolder named after your plugin.

    plugins/myawesomeplugin_win64.dll
    plugins/myawesomeplugin/thirdparty.dll

    is how it should look.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  3. #18
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Compiling works now.

    But another problem occurs...
    When I compile with Cygwin GCC, and I copy the DLL into %APPDATA%\ts3client\plugins it tells me "Cygwin1.dll is missing and the program cant start"... Does not affect TS3, only my plugin.
    When I copy the cygwin1.dll into %APPDATA%\ts3client\plugins\[my plugin name]\cygwin1.dll I still get that Error. I thought I have to mirror the path to the inital DLL, but that didnt work either.
    Do you know any free C compiler that don't need any VM like Cygwin to run?
    And maybe does not need aditional DLLs to run?
    Last edited by Jhhhj_original; February 14th, 2017 at 11:04 PM.

  4. #19
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376

  5. #20
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Alright, I got my compiler working and a test code written... Surprise... It isn't working.
    Its just for Testing purposes though.

    Code:
    int ts3plugin_onTextMessageEvent(uint64* schid, anyID* toID, anyID* fromID, const char* fromName, const char* fromUniqueIdentifier, const char* message, int* ffIgnored) {
        if ( &message == "." ) {
            const char* sm = "Hello";
            ts3libfuncs.requestSendServerTextMsg(&schid, &sm, 0);
            return 0;
        }
        return 0;
    }
    Thats just the main part...

    In TS it says "Failed to load Plugin: Failed to open plugin.: [some id]", but it says that for 3 more plugins aswell.

    Any idea why?

  6. #21
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    That [some id] is the important part

    I assume, you are missing the ts3plugin_apiVersion callback or you do not return the needed apiVersion.
    Or you miss some other required function (see one of my first posts here in this thread).

    Other reason could be a missing dependency. So if you link another library into your DLL and the client can't resolve this dependency, this message will appear too.

    Maybe your client log contains some more detailed information.

  7. #22
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Aaah, alright, not it changed...

    "Failed to open plugin: 20 (minimum 21, currently 22)"

    Let me guess... Client API version?
    But even if I am sure I downloaded API Version 21 and I also returned 21 as int on the ts3plugin_apiVersion() it still throws the same Error...
    Last edited by Jhhhj_original; February 18th, 2017 at 04:59 PM.

  8. #23
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    Quote Originally Posted by Jhhhj_original View Post
    Aaah, alright, not it changed...

    "Failed to open plugin: 20 (minimum 21, currently 22)"

    Let me guess... Client API version?
    But even if I am sure I downloaded API Version 21 and I also returned 21 as int on the ts3plugin_apiVersion() it still throws the same Error...
    The downloaded headers are just a secondary issue (I guess they won't make any difference on loading, wrong headers will be an issue in setFunctionPointers). Make sure, you replaced your old development libraries with your new one.

    Still, the clientlog might be more detailed.

  9. #24
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Alright.
    Clientlog says "Error Code 193".
    I looked it up, it means its not the correct bit version.
    Soooooo....
    Lets get a new 64 bit compiler, cause I can't find one in VS CE

  10. #25
    Join Date
    September 2012
    Posts
    6,080
    VS allows you to compile 64 bit. Just add a solution configuration for 64 bit, then build the 64bit one.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  11. #26
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Alright, figured out how to get it compiled in VS CE, 32 and 64 bit.
    Now it gives me the Error:

    Could not load Plugin: Failed to open Plugin.: 5177376 (minimum: 21, currently: 22)

    Is there like a list of all the error codes where I can just look up whats wrong?

    From my Clientlog:
    Code:
    
    20.02.2017 20:58:51	Plugins	Info	Failed to load plugin: %appdata%\TS3Client\plugins\myplugin_win64.dll	
    20.02.2017 20:58:51	Plugins	Info	LoadLibrary error: 193
    

    EDIT:
    Re-wrote it, got the error ID 0 now.

    Could not load Plugin: Failed to open Plugin.: 0 (minimum: 21, currently: 22)
    And again, Clientlog still says the same.
    Last edited by Jhhhj_original; February 20th, 2017 at 10:05 PM.

  12. #27
    Join Date
    September 2012
    Posts
    6,080
    ERROR_BAD_EXE_FORMAT
    193 (0xC1)
    %1 is not a valid Win32 application.

    https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  13. #28
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    That helps, thanks.
    "%1 is not a valid Win32 application"...
    I don't get that, I compiled it 64 / 32 bit, started a Win32 DLL project and compiled it in both versions...
    Like, how can it not be valid then?
    Or does it have something to do with the code itself?
    Last edited by Jhhhj_original; February 23rd, 2017 at 01:27 PM.

  14. #29
    Join Date
    October 2015
    Location
    Germany, Bavaria
    Posts
    145
    Haven't been able to find a fix as of yet...
    I found out that this error might occur on missing or corrupted dependencies...

    a) Afaik, I dont have any external dependencies (except for the TS3 API)

    b) How can I find out which dependencies the error is talking about?

    c) Any other ideas how it may have been caused?

    (I guess this is now more topic for stackoverflow?)

  15. #30
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    I use Dependency Walker to get infos about Windows libraries.

    There you'll also see, for which architecture your compiler built your lib.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Creating plugin Java
    By Retzugil in forum Client Plugins / Lua Scripts
    Replies: 1
    Last Post: May 15th, 2014, 08:23 AM
  2. Creating my first TS3 plugin and it won't load
    By DrPastah in forum Client Plugins / Lua Scripts
    Replies: 5
    Last Post: March 12th, 2014, 12:14 PM
  3. Problems while creating a plugin..
    By Loreman in forum General Questions
    Replies: 0
    Last Post: October 6th, 2013, 04:45 PM
  4. Creating complex GUI with Plugin
    By TigerSnail in forum General Questions
    Replies: 3
    Last Post: May 23rd, 2013, 09:43 AM

Tags for this Thread

Posting Permissions

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