Jump to content

Channel Status Update | Player Count


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please
( GitHub )

e32497e11f.png

---------------------------------

20511268747470733a2f2f7075752e73682f464e

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 64
  • Eyes 1
  • Scream 1
  • Good 25
  • Love 58

 

Link to comment
Share on other sites

  • Management
Link to comment
Share on other sites

Hi everyone!

Do you guys also have compiling problems with the db source?
First there's need to be a space between those > marks at the ClientManager.h:
 

typedef boost::unordered_map<short, std::pair<BYTE, int>> TChannelStatusMap;

Correct form maybe:
 

typedef boost::unordered_map<short, std::pair<BYTE, int> > TChannelStatusMap;

Umm and I get many errors when I try to compile the ClientManager.cpp:
spacer.png

Sorry guys I don't really understand the programming language (I only understand the PHP language  so I'm just a copy-paste guy) but I think there is something near the one of the for cycles that not correct in my case.
(Btw I use P3NG3R's no TXT ClientManager.cpp version.)
 

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

  • Honorable Member
1 hour ago, Werwolf94 said:

 I don't really understand the programming language

You don't understand the programming language,

but you are saying there's need to be a space (wtf?):

 

1 hour ago, Werwolf94 said:

First there's need to be a space between those > marks at the ClientManager.h:


typedef boost::unordered_map<short, std::pair<BYTE, int>> TChannelStatusMap;

Correct form maybe:


typedef boost::unordered_map<short, std::pair<BYTE, int> > TChannelStatusMap;

 

 

1 hour ago, Werwolf94 said:

I think there is something near the one of the for cycles that not correct in my case.

?

use at least gcc49 compiler for c++11

Edited by Mali61
gcc

 

Link to comment
Share on other sites

If you have ChangeChannel system implemented with this function 

Quote

    if app.ENABLE_MOVE_CHANNEL:
        def __GetServerID(self):
            serverID = 1
            for i in serverInfo.REGION_DICT[0].keys():
                if serverInfo.REGION_DICT[0]["name"] == net.GetServerInfo().split(",")[0]:
                    serverID = int(i)
                    break
    
            return serverID
        
        def RefreshChannel(self, channel):
            channelName = ""
            serverName = serverInfo.REGION_DICT[0][self.__GetServerID()]["name"]
            if channel in serverInfo.REGION_DICT[0][self.__GetServerID()]["channel"]:
                channelName = serverInfo.REGION_DICT[0][self.__GetServerID()]["channel"][int(channel)]["name"]
            elif channel == 99:
                channelName = "Special CH"
            else:
                channelName = "Unknow CH"
                
            net.SetServerInfo("%s, %s" % (serverName,channelName))
            if self.interface:
                self.interface.wndMiniMap.serverInfo.SetText(net.GetServerInfo())

You wil take that error.. 

Quote

0524 17:34:36311 :: TypeError
0524 17:34:36311 :: : 
0524 17:34:36311 :: NotifyChannelState() takes exactly 3 arguments (4 given)

 

Link to comment
Share on other sites

  • 4 weeks later...

ClientManager.cpp: In member function 'void CClientManager::UpdateChannelStatus(TChannelStatus*)':
ClientManager.cpp:4326:30: error: 'TChannelStatus' has no member named 'player_count' it->second.second = pData->player_count;


ClientManager.cpp:4329:80: error: 'TChannelStatus' has no member named 'player_count' m_mChannelStatus.emplace(pData->nPort, std::make_pair(pData>bStatus, pData->player_count));
 

Thanks in advance

 

EDIT: Solved the errors, but: spacer.png and it changes spacer.png (1 player logged in)

 

EDIT2: Solved.

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

  • 1 month later...
  • 4 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.