Jump to content

ImKoksu

Member
  • Posts

    2
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by ImKoksu

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

     

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