Jump to content

Recommended Posts

VS2019, after i compiled the discordrpc.lib, this error occurs:

 

Spoiler

90936385_572731853646751_298963834431864

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 1

🖥️ SysAdmin — Government (HU)
🛠️ Freelance Metin2 Dev • DevOps
🐧 FreeBSD / Linux | 🛡️ Security & WAF | 🚀 Performance | 🔥 Firewalls | ⚙ Automation
Open to work - Contact me on Discord @matteo_r

1 hour ago, Minton said:

VS2019, after i compiled the discordrpc.lib, this error occurs:

 

  Reveal hidden contents

90936385_572731853646751_298963834431864

 

The error occurs due to the fact that the libs were compiled with a older version of VS. follow Mali's tutorial and just do the same, it will work for sure.
Libs link: 

This is the hidden content, please

Quote

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 66
  • Facepalm 1
  • Dislove 1
  • Not Good 1
  • Cry 1
  • Think 1
  • Good 16
  • Love 6
  • Love 38

Software Engineer @ CNH Industrial (NAFTA/EMEA)

13 hours ago, xAres said:

The error occurs due to the fact that the libs were compiled with a older version of VS. follow Mali's tutorial and just do the same, it will work for sure.
Libs link: 

This is the hidden content, please

 

Yes, i did the same thats why i wrote "after i compiled"....

  • Metin2 Dev 8
  • Good 3
  • Love 1
  • Love 5

🖥️ SysAdmin — Government (HU)
🛠️ Freelance Metin2 Dev • DevOps
🐧 FreeBSD / Linux | 🛡️ Security & WAF | 🚀 Performance | 🔥 Firewalls | ⚙ Automation
Open to work - Contact me on Discord @matteo_r

10 hours ago, Minton said:

Yes, i did the same thats why i wrote "after i compiled"....

Download libjpeg sources and compile them as lib. That's what error is telling you. How hard is to understand?

  • Confused 1
  • Lmao 1

PeriodWars

release kraken GIF

On 6/10/2020 at 11:41 AM, Mali61 said:

update Discord.h

I am shaman f on game and on discord it show M -> https://metin2.download/picture/14rH9BDNc8d8f9djGntnD9yG7LOAPmr9/.png , is an problem for me or what ?

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 1
  • Honorable Member
11 hours ago, r00t3r said:

I am shaman f on game and on discord it show M -> https://metin2.download/picture/3qai9R5r253qM8dMg4B0wnQst8WZOpSN/.png , is an problem for me or what ?

fixed

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

 

  • 2 weeks later...
  • 2 weeks later...

Hello i have this error: 
Error    2    error C2797: 'IoThreadHolder::keepRunning': list initialization inside member initializer list or non-static data member initializer is not implemented    c:\users\patri\desktop\pvm projekt\#clientsource\discord_rpc\discord_rpc.cpp    82    1    discord_rpc
 

  • 3 weeks later...
  • 3 months later...
  • 2 months later...
  • 2 months later...
Severity Code Description Project File Line Hide Status Error C1047 '.. \ .. \ extern \ lib \ libjpeg-MT.lib' object or library file was created by a different version of the compiler than other objects such as '.. \ .. \ extern \ lib \ discord_rpc_r.lib'; Recompile all objects and libraries with the same compiler UserInterface

@Mali61

  • 3 weeks later...
  • 2 weeks later...

i have problem
this is with the library extern
when compile the binary and wants to read the discord library 
in these symbols it says that it does not have them

unknown.png?width=858&height=466

Edited by Metin2 Dev
Core X - External 2 Internal
  • 1 month later...
  • Active+ Member

@MaliWould be really nice if you can add playerGetLevel() function instad of guild name next to the player name. I found some piece of code, but I don't know how to split player name with level.

Spoiler
#include "InstanceBase.h"
  
CInstanceBase* pkMainInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
char info[32 + 1];
snprintf(info, sizeof(info), "Lv. %u", pkMainInstance->GetLevel());

 

If you will have some free time to publish it, I'll be really glad as many others.

Thanks for possible answer!

I'll be always helpful!  😉

  • Honorable Member
11 hours ago, ReFresh said:

@MaliWould be really nice if you can add playerGetLevel() function instad of guild name next to the player name. I found some piece of code, but I don't know how to split player name with level.

https://metin2.download/picture/8SFLL19c83n64x9XVPS70Hq4j7Rx9emd/.png

73M4HTZ.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 8
  • Good 4
  • Love 4
  • Love 5

 

  • Active+ Member

@Mali Thank you very much! And one more thing. Do you know some solution for diacritics? I mean letters diacritics worte in source code - letters like: "ěščřžýáíöóú". It would be nice too. But I don't know how hard it could be or if it's possible at all. I'm 100% sure, many people facing the same "issue".

 

@LethalStrikeR Just download and compile your libjpeg library with the same toolset as you compile your client.

Edited by ReFresh
  • Dislove 1

I'll be always helpful!  😉

  • 3 weeks later...

Maybe someone can make use of it:
 

spacer.png

 

Sourcechanges:

Spoiler


discord_rpc.h (in the rpc source & your extern folder)

// Search the struct and replace it

typedef struct DiscordRichPresence {
    const char* state;   /* max 128 bytes */
    const char* details; /* max 128 bytes */
    int64_t startTimestamp;
    int64_t endTimestamp;
    const char* largeImageKey;  /* max 32 bytes */
    const char* largeImageText; /* max 128 bytes */
    const char* smallImageKey;  /* max 32 bytes */
    const char* smallImageText; /* max 128 bytes */
    const char* partyId;        /* max 128 bytes */
    int partySize;
    int partyMax;
    const char* matchSecret;    /* max 128 bytes */
    const char* joinSecret;     /* max 128 bytes */
    const char* spectateSecret; /* max 128 bytes */
    const char* buttonLabel; /* max 128 bytes */
    const char* buttonURL; /* max 128 bytes */
    int8_t instance;
} DiscordRichPresence;

 

serialization.cpp (in the rpc source):

// Search:

                if ((presence->partyId && presence->partyId[0]) || presence->partySize ||
                    presence->partyMax) {

// Add ABOVE:

                if (presence->buttonLabel && presence->buttonLabel[0] && presence->buttonURL && presence->buttonURL[0]) {
                    WriteArray assets(writer, "buttons");
                    WriteObject btn1(writer);
                    WriteOptionalString(writer, "label", presence->buttonLabel);
                    WriteOptionalString(writer, "url", presence->buttonURL);
                }

 

In your client source you have to add it to the RPC update:
 

	discordPresence.buttonLabel = "Join Servername2's Discord";
	discordPresence.buttonURL = "https://discord.gg/ASDASDASDIASDASDAOPS";

	Discord_UpdatePresence(&discordPresence);


 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Good 1
  • Love 2
  • Love 6
  • 5 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.