Jump to content

Player Rank System


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please
( GitHub )

.gif

 

This is the hidden content, please

  • Metin2 Dev 211
  • kekw 2
  • Eyes 4
  • Dislove 5
  • Angry 1
  • Not Good 2
  • Think 6
  • Confused 4
  • Scream 5
  • Lmao 2
  • Good 82
  • muscle 1
  • Love 9
  • Love 238

 

Link to comment
Share on other sites

  • 3 weeks later...

Hello! I have problem in packet.h

 

In file included from OXEvent.cpp:6:
packet.h:1302: error: ISO C++ forbids initialization of member 'header'
packet.h:1302: error: making 'header' static
packet.h:1302: error: ISO C++ forbids in-class initialization of non-const stati                                        c member 'header'
packet.h:1303: error: ISO C++ forbids initialization of member 'subheader'
packet.h:1303: error: making 'subheader' static
packet.h:1303: error: ISO C++ forbids in-class initialization of non-const stati                                        c member 'subheader'
packet.h:1306: error: ISO C++ forbids initialization of member 'level'
packet.h:1306: error: making 'level' static
packet.h:1306: error: ISO C++ forbids in-class initialization of non-const stati                                        c member 'level'
packet.h:1307: error: ISO C++ forbids initialization of member 'job'
packet.h:1307: error: making 'job' static
packet.h:1307: error: ISO C++ forbids in-class initialization of non-const stati                                        c member 'job'
packet.h:1308: error: ISO C++ forbids initialization of member 'empire'
packet.h:1308: error: making 'empire' static
packet.h:1308: error: ISO C++ forbids in-class initialization of non-const stati                                        c member 'empire'
packet.h: In constructor 'packet_ranking_send::packet_ranking_send(const char*,                                         int, int, int, const char*)':
packet.h:1297: error: 'BYTE packet_ranking_send::subheader' is a static data mem                                        ber; it can only be initialized at its definition
packet.h:1297: error: 'RANK' is not a class or namespace
packet.h:1297: error: 'int packet_ranking_send::level' is a static data member;                                         it can only be initialized at its definition
packet.h:1297: error: 'BYTE packet_ranking_send::job' is a static data member; i                                        t can only be initialized at its definition
packet.h:1297: error: 'BYTE packet_ranking_send::empire' is a static data member                                        ; it can only be initialized at its definition
gmake: *** [OBJDIR/OXEvent.o] B▒▒d 1

 

 

Packet.h

Spoiler

#if defined(__BL_RANKING__)
enum RANK 
{
    SUBHEADER_RANKING_SEND,
    SUBHEADER_RANKING_OPEN,
    RANKING_MAX_NUM = 500,
    HEADER_GC_RANKING = 160,
};
typedef struct packet_ranking_send
{
    packet_ranking_send()
    {
        std::strncpy(szName, "", sizeof(szName));
        std::strncpy(szGuildName, "", sizeof(szGuildName));
    }
    packet_ranking_send(const char* name, int c_level, int c_job, int c_empire, const char* guild)
        : subheader(RANK::SUBHEADER_RANKING_SEND), level(c_level), job(c_job), empire(c_empire)
    {
        std::strncpy(szName, name, sizeof(szName));
        std::strncpy(szGuildName, guild, sizeof(szGuildName));
    }
    BYTE    header = HEADER_GC_RANKING;
    BYTE    subheader = SUBHEADER_RANKING_OPEN;
    char    szName[CHARACTER_NAME_MAX_LEN + 1];
    char    szGuildName[GUILD_NAME_MAX_LEN + 1];
    int        level = 0;
    BYTE    job = 0;
    BYTE    empire = 0;
} TPacketGCRankingSend;
#endif

 

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
  • Management
8 hours ago, danhakhavro said:

 

Don't you want to share your version for guild ranking? : D

This is the hidden content, please

based on old system, not update

PS: I just adapted, it's optimizable

  • Metin2 Dev 34
  • Eyes 1
  • Dislove 1
  • Good 10
  • Love 9
Link to comment
Share on other sites

  • Management
57 minutes ago, Cryptex said:

not working spacer.png

Work.

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

  • 4 months later...
  • 11 months later...

 

0922 23:21:15221 :: Traceback (most recent call last):

0922 23:21:15222 ::   File "networkModule.py", line 247, in SetGamePhase

0922 23:21:15222 ::   File "game.py", line 98, in __init__

0922 23:21:15222 ::   File "interfaceModule.py", line 298, in MakeInterface

0922 23:21:15222 ::   File "interfaceModule.py", line 203, in __MakeWindows

0922 23:21:15222 ::   File "uiPlayerRanking.py", line 26, in __init__

0922 23:21:15223 ::   File "uiPlayerRanking.py", line 80, in LoadWindow

0922 23:21:15223 ::   File "ui.py", line 2704, in GetChild

0922 23:21:15223 :: KeyError
0922 23:21:15223 :: : 
0922 23:21:15223 :: 'CurrentPage'
0922 23:21:15223 :: 

What am i doing wrong? I added all the stuff, even ymir_work ui in ETC. Thank you

Link to comment
Share on other sites

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