Jump to content
×
×
  • Create New...

Player Rank System


Recommended Posts

  • 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...
  • Administrator
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 14
  • Love 5
  • Good 6
  • Dislove 1

english_banner.gif

Link to comment
Share on other sites

  • 4 months later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 36

      Destroy Item System

    2. 1

      Brillances

    3. 0

      Fusion.org is Looking for Staff Members

    4. 1

      Brillances

    5. 3

      ELONIA2 | PVM-MEDIUM | 11 LANGUAGES | INTERNATIONAL | A NEW STORY

    6. 4

      Spider Queen not spawining in spider dungeon v1

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.