Jump to content

[C++]Client source c++20


SamuraiHUN

Recommended Posts

This is the hidden content, please

Metin2 Download

 

How to Update Client src c++20

Happy Daniel Bryan GIF by WWE

Thanks lot of @ Mali

 

First, we open the client source with visual studio 2022.

Select all projects and right click on them -> properties -> General -> c++ language standard -> Here we choose c++20.

https://metin2.download/video/Q0tB47SEBj0LU7q27Sy64U11018tamx5/.mp4

 

 need to make some step from this topic

This is the hidden content, please

 

If you don't understand something, you can ask your questions here.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 185
  • kekw 2
  • Angry 1
  • Not Good 3
  • Smile Tear 1
  • Confused 1
  • Good 70
  • Love 10
  • Love 97
Link to comment
Share on other sites

  • 4 months later...
  • 4 months later...
  • 2 months later...
  • Premium
On 6/23/2022 at 7:06 PM, Luzer said:

You can create additional variable for each packet.  This will fix your problem.

c085e29bd3feee41a826e33ecada1258.png

3f770573cb6631bf325713f0bb50b130.png

Please don't start to make lot of useless variables.

The error is just because of reference in function parameter.

 

void Set(int header, TPacketType && rPacketType);
void CNetworkPacketHeaderMap::Set(int header, TPacketType && rPacketType)

 

  • Metin2 Dev 2
Link to comment
Share on other sites

  • 2 months later...
  • Active+ Member

Thank you. However, it has a problem.
The following part in EterBase/Stl.h:

template <typename T>
void DeleteListItem(std::list<T> * pList, T pItem)
{
	auto itor = pList->begin();
	for (; itor != pList->end(); ++itor)
	{
		if (pItem == *itor)
		{
			if (1 == pList->size())
			{
				pList->clear();
			}
			else
			{
				pList->erase(itor);
			}
			break;
		}
	}
}

After doing this I get this error:

spacer.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 months later...
  • Active+ Member

Thank you for sharing this tutorial, for the Set function error

 

NetPacketHeaderMap.h

//Add under the SPacketType struct

        TPacketType& createPacketType(int iSize = 0, bool bFlag = false)

        {

            return *(new TPacketType(iSize, bFlag));

        }

 

and replace all the 

//replace

    CNetworkPacketHeaderMap::TPacketType(

//to this

    createPacketType(

 

i solve it like this without any errors.

Link to comment
Share on other sites

  • 6 months later...

Announcements



×
×
  • 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.