Jump to content

Channel Status Update | Player Count


Recommended Posts

  • VIP

wow thanks is awesome :)

" Don`t pretend things change if you always do the same thing"

"Don`t give up on a dream for how long it will take, time will pass the same"

Link to post

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.)
 

Link to post
Posted (edited)
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 (see edit history)

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post

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 post
  • 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 CristianDragan (see edit history)
Link to post
  • 1 month later...
  • VIP
1 hour ago, Ulthar said:

hello, i have some problem with it...
there is the picture

 

spacer.png

 

what should i do? or what did i wrong?

Help me please.

Seems like you have some syntax errors  (maybe you forgot a } or something like that)

Link to post
  • ASIKOO changed the title to Channel Status Update | Player Count

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.