Jump to content

Problem Compile GAME ( Mainline_sg )


Recommended Posts

Hello I've got problem while compile game , any one got any idea how to fix it ?  thank you :)

BUILD ERROR LOG: 

Spoiler

In file included from char.cpp:4:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char.cpp:25:
shop_manager.h:40:7: warning: no newline at end of file
In file included from char.cpp:62:
PetSystem.h:163:31: warning: no newline at end of file
char.cpp:7207: warning: this decimal constant is unsigned only in ISO C90
char.cpp:7215:2: warning: no newline at end of file
In file included from char_battle.cpp:27:
shop_manager.h:40:7: warning: no newline at end of file
In file included from char_horse.cpp:14:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char_item.cpp:44:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char_item.cpp:47:
belt_inventory_helper.h:108:42: warning: no newline at end of file
In file included from PetSystem.cpp:8:
PetSystem.h:163:31: warning: no newline at end of file
In file included from PetSystem.cpp:9:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
PetSystem.cpp:637:2: warning: no newline at end of file
In file included from char_state.cpp:25:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
char.cpp: In member function 'void CHARACTER::PointChange(BYTE, int, bool, bool)':
char.cpp:3088: warning: comparison between signed and unsigned integer expressions
In file included from cmd_general.cpp:36:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
constants.cpp:291: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:292: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:293: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:294: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:295: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:296: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:297: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:298: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:299: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:300: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:301: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:302: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:303: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:304: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:305: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:306: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:307: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:308: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:309: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:310: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:311: warning: this decimal constant is unsigned only in ISO C90
PetSystem.cpp: In member function 'virtual bool CPetActor::_UpdateFollowAI()':
PetSystem.cpp:246: warning: unused variable 'bDoMoveAlone'
PetSystem.cpp: In member function 'CPetActor* CPetSystem::Summon(DWORD, CItem*, const char*, bool, DWORD)':
PetSystem.cpp:552: warning: unused variable 'petVID'
In file included from char_item.cpp:47:
belt_inventory_helper.h: In static member function 'static BYTE CBeltInventoryHelper::GetBeltGradeByRefineLevel(int)':
belt_inventory_helper.h:28: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:640: warning: comparison is always false due to limited range of data type
char_item.cpp:666: warning: comparison is always false due to limited range of data type
char_item.cpp: In member function 'bool CHARACTER::UseItemEx(CItem*, TItemPos)':
char_item.cpp:2387: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2391: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2403: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2407: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2434: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2442: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:5087: warning: comparison between signed and unsigned integer expressions
cube.cpp: In function 'bool Cube_make(CHARACTER*)':
cube.cpp:544: warning: comparison between signed and unsigned integer expressions
cube.cpp: In function 'void Cube_MakeCubeInformationText()':
cube.cpp:716: warning: unused variable 'npcVNUM'
cube.cpp: In function 'bool Cube_InformationInitialize()':
cube.cpp:783: warning: comparison between signed and unsigned integer expressions
In file included from desc_manager.cpp:15:
ClientPackageCryptInfo.h:117:41: warning: no newline at end of file
char_state.cpp: In member function 'virtual void CHARACTER::StateMove()':
char_state.cpp:901: warning: unused variable 'rider'
char_item.cpp: In member function 'bool CHARACTER::UseItem(TItemPos, TItemPos)':
char_item.cpp:5159: warning: unused variable 'wDestCell'
char_item.cpp:5160: warning: unused variable 'bDestInven'
char_item.cpp: In member function 'bool CHARACTER::EquipItem(CItem*, int)':
char_item.cpp:6160: warning: array subscript has type 'char'
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_AddBuffsFromItem(CItem*)':
char_item.cpp:6224: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_RemoveBuffsFromItem(CItem*)':
char_item.cpp:6236: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::CanEquipNow(CItem*, const TItemPos&, const TItemPos&)':
char_item.cpp:7422: warning: unused variable 'itemType'
char_item.cpp:7423: warning: unused variable 'itemSubType'
In file included from config.cpp:22:
check_server.h: In static member function 'static bool CheckServer::CheckIp(const char*)':
check_server.h:24: warning: comparison between signed and unsigned integer expressions
config.cpp: In function 'void config_init(const std::string&)':
config.cpp:435: warning: NULL used in arithmetic
config.cpp:459: warning: NULL used in arithmetic
config.cpp:483: warning: NULL used in arithmetic
config.cpp:505: warning: unused variable 'line'
db.cpp: In member function 'void DBManager::Query(const char*, ...)':
db.cpp:93: warning: comparison between signed and unsigned integer expressions
db.cpp: At global scope:
db.cpp:95: error: expected unqualified-id before '{' token
db.cpp: In member function 'SQLMsg* DBManager::DirectQuery(const char*, ...)':
db.cpp:114: warning: comparison between signed and unsigned integer expressions
db.cpp: At global scope:
db.cpp:116: error: expected unqualified-id before '{' token
desc_client.cpp: In member function 'void CLIENT_DESC::UpdateChannelStatus(DWORD, bool)':
desc_client.cpp:299: warning: comparison between signed and unsigned integer expressions
cmd_gm.cpp: In function 'void do_set_stat(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:3935: warning: NULL used in arithmetic
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:679: warning: control reaches end of non-void function
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_ValueChange(BYTE, BYTE, BYTE)':
char_item.cpp:6271: warning: 'pBuff' may be used uninitialized in this function
gmake: *** [OBJDIR/db.o] Error 1
gmake: *** Waiting for unfinished jobs....
cmd_gm.cpp: In function 'void do_use_item(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:4357: warning: 'cell' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_set_stat(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:3977: warning: 'n' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_mob_ld(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:855: warning: 'x' may be used uninitialized in this function
cmd_gm.cpp:855: warning: 'y' may be used uninitialized in this function
 

 

Link to comment
Share on other sites

Check your db.cpp at 95's and 116's line (you may share these lines with us);
Probably you forgot two ";" or the function name O.o


These are the 2 errors, both in "db.cpp":

db.cpp: At global scope:
db.cpp:95: error: expected unqualified-id before '{' token
db.cpp: At global scope:
db.cpp:116: error: expected unqualified-id before '{' token

  • Love 1
Link to comment
Share on other sites

 

3 minutes ago, ErNabbone said:

Check your db.cpp at 95's and 116's line (you may share these lines with us);
Probably you forgot two ";" or the function name O.o


These are the 2 errors, both in "db.cpp":

db.cpp: At global scope:
db.cpp:95: error: expected unqualified-id before '{' token
db.cpp: At global scope:
db.cpp:116: error: expected unqualified-id before '{' token

thank you for replay ..  Those are line From 95 to  125 :

Spoiler

{
    char szQuery[4096];
    va_list args;

    va_start(args, c_pszFormat);
    vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
    va_end(args);

    m_sql.AsyncQuery(szQuery);
}

SQLMsg * DBManager::DirectQuery(const char * c_pszFormat, ...)
{
    char szQuery[4096];
    va_list args;
    va_start(args, c_pszFormat);
    vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
    va_end(args);
    std::string sQuery(szQuery);
    return m_sql_direct.DirectQuery(sQuery.substr(0, sQuery.find_first_of(";") == -1 ? sQuery.length() : sQuery.find_first_of(";")).c_str());
}
{
    char szQuery[4096];
    va_list args;

    va_start(args, c_pszFormat);
    vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
    va_end(args);

    return m_sql_direct.DirectQuery(szQuery);
}

 

Link to comment
Share on other sites

So, you forgot the function names:

 

{

	char szQuery[4096];

	va_list args;
    va_start(args, c_pszFormat);
    vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
    va_end(args);

    m_sql.AsyncQuery(szQuery);
}


Should be "void DBManager::Query(const char * c_pszFormat, ...)".
 


But I don't know which function is this:

(should be "void DBManager::ReturnQuery(int iType, DWORD dwIdent, void * pvData, const char * c_pszFormat, ...)" but I'm not sure)

 

{

	    char szQuery[4096];

	    va_list args;


 va_start(args, c_pszFormat);
    vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
    va_end(args);

    return m_sql_direct.DirectQuery(szQuery);
}

  

If it's like I do suppose, you should replace 95's from "{" to "void DBManager::Query(const char * c_pszFormat, ...) {" and the 116's even from "{" to "void DBManager::ReturnQuery(int iType, DWORD dwIdent, void * pvData, const char * c_pszFormat, ...) {".

  • Love 1
Link to comment
Share on other sites

14 minutes ago, ErNabbone said:

So, you forgot the function names:

 


{

	    char szQuery[4096];

	    va_list args;


    va_start(args, c_pszFormat);     vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);     va_end(args);

    m_sql.AsyncQuery(szQuery); } Should be "void DBManager::Query(const char * c_pszFormat, ...)"

But I don't know which function is this:

(should be "void DBManager::ReturnQuery(int iType, DWORD dwIdent, void * pvData, const char * c_pszFormat, ...)" but I'm not sure)

 


{

	    char szQuery[4096];

	    va_list args;


    va_start(args, c_pszFormat);
    vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
    va_end(args);

    return m_sql_direct.DirectQuery(szQuery);
}

If it's like I do suppose, you should replace 95's from "{" to "void DBManager::Query(const char * c_pszFormat, ...) {" and the 116's even from "{" to "void DBManager::ReturnQuery(int iType, DWORD dwIdent, void * pvData, const char * c_pszFormat, ...) {".

Ehhh. :/ same problem with the compile game :/  but even more :/  

Spoiler

In file included from char.cpp:4:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char.cpp:25:
shop_manager.h:40:7: warning: no newline at end of file
In file included from char.cpp:62:
PetSystem.h:163:31: warning: no newline at end of file
char.cpp:7207: warning: this decimal constant is unsigned only in ISO C90
char.cpp:7215:2: warning: no newline at end of file
In file included from char_battle.cpp:27:
shop_manager.h:40:7: warning: no newline at end of file
In file included from char_horse.cpp:14:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char_item.cpp:44:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char_item.cpp:47:
belt_inventory_helper.h:108:42: warning: no newline at end of file
In file included from PetSystem.cpp:8:
PetSystem.h:163:31: warning: no newline at end of file
In file included from PetSystem.cpp:9:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
PetSystem.cpp:637:2: warning: no newline at end of file
In file included from char_state.cpp:25:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from cmd_general.cpp:36:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
constants.cpp:291: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:292: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:293: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:294: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:295: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:296: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:297: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:298: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:299: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:300: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:301: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:302: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:303: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:304: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:305: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:306: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:307: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:308: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:309: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:310: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:311: warning: this decimal constant is unsigned only in ISO C90
char.cpp: In member function 'void CHARACTER::PointChange(BYTE, int, bool, bool)':
char.cpp:3088: warning: comparison between signed and unsigned integer expressions
In file included from char_item.cpp:47:
belt_inventory_helper.h: In static member function 'static BYTE CBeltInventoryHelper::GetBeltGradeByRefineLevel(int)':
belt_inventory_helper.h:28: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:640: warning: comparison is always false due to limited range of data type
char_item.cpp:666: warning: comparison is always false due to limited range of data type
char_item.cpp: In member function 'bool CHARACTER::UseItemEx(CItem*, TItemPos)':
char_item.cpp:2387: warning: format '%ld' expects type 'long int', but argument 4 has type 'DWORD'
char_item.cpp:2387: warning: format '%ld' expects type 'long int', but argument 5 has type 'int'
char_item.cpp:2391: warning: format '%ld' expects type 'long int', but argument 4 has type 'DWORD'
char_item.cpp:2391: warning: format '%ld' expects type 'long int', but argument 5 has type 'int'
char_item.cpp:2403: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2407: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2434: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2442: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:5087: warning: comparison between signed and unsigned integer expressions
In file included from desc_manager.cpp:15:
ClientPackageCryptInfo.h:117:41: warning: no newline at end of file
PetSystem.cpp: In member function 'virtual bool CPetActor::_UpdateFollowAI()':
PetSystem.cpp:246: warning: unused variable 'bDoMoveAlone'
PetSystem.cpp: In member function 'CPetActor* CPetSystem::Summon(DWORD, CItem*, const char*, bool, DWORD)':
PetSystem.cpp:552: warning: unused variable 'petVID'
cube.cpp: In function 'bool Cube_make(CHARACTER*)':
cube.cpp:544: warning: comparison between signed and unsigned integer expressions
cube.cpp: In function 'void Cube_MakeCubeInformationText()':
cube.cpp:716: warning: unused variable 'npcVNUM'
cube.cpp: In function 'bool Cube_InformationInitialize()':
cube.cpp:783: warning: comparison between signed and unsigned integer expressions
cmd_gm.cpp: In function 'void do_set_stat(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:3935: warning: NULL used in arithmetic
desc_client.cpp: In member function 'void CLIENT_DESC::UpdateChannelStatus(DWORD, bool)':
desc_client.cpp:299: warning: comparison between signed and unsigned integer expressions
char_state.cpp: In member function 'virtual void CHARACTER::StateMove()':
char_state.cpp:901: warning: unused variable 'rider'
In file included from config.cpp:22:
check_server.h: In static member function 'static bool CheckServer::CheckIp(const char*)':
check_server.h:24: warning: comparison between signed and unsigned integer expressions
config.cpp: In function 'void config_init(const std::string&)':
config.cpp:435: warning: NULL used in arithmetic
config.cpp:459: warning: NULL used in arithmetic
config.cpp:483: warning: NULL used in arithmetic
config.cpp:505: warning: unused variable 'line'
char_item.cpp: In member function 'bool CHARACTER::UseItem(TItemPos, TItemPos)':
char_item.cpp:5159: warning: unused variable 'wDestCell'
char_item.cpp:5160: warning: unused variable 'bDestInven'
char_item.cpp: In member function 'bool CHARACTER::EquipItem(CItem*, int)':
char_item.cpp:6160: warning: array subscript has type 'char'
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_AddBuffsFromItem(CItem*)':
char_item.cpp:6224: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_RemoveBuffsFromItem(CItem*)':
char_item.cpp:6236: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::CanEquipNow(CItem*, const TItemPos&, const TItemPos&)':
char_item.cpp:7422: warning: unused variable 'itemType'
char_item.cpp:7423: warning: unused variable 'itemSubType'
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:679: warning: control reaches end of non-void function
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_ValueChange(BYTE, BYTE, BYTE)':
char_item.cpp:6271: warning: 'pBuff' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_use_item(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:4357: warning: 'cell' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_set_stat(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:3977: warning: 'n' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_mob_ld(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:855: warning: 'x' may be used uninitialized in this function
cmd_gm.cpp:855: warning: 'y' may be used uninitialized in this function
In file included from input_db.cpp:13:
shop_manager.h:40:7: warning: no newline at end of file
input_db.cpp:2722:2: warning: no newline at end of file
In file included from input_main.cpp:16:
shop_manager.h:40:7: warning: no newline at end of file
exchange.cpp: In constructor 'CExchange::CExchange(CHARACTER*)':
exchange.cpp:121: error: 'victim' was not declared in this scope
gmake: *** [OBJDIR/exchange.o] Error 1
gmake: *** Waiting for unfinished jobs....
In file included from item.cpp:22:
belt_inventory_helper.h:108:42: warning: no newline at end of file
In file included from item.cpp:23:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
item.cpp:2084:2: warning: no newline at end of file
input_main.cpp: In member function 'void CInputMain::Exchange(CHARACTER*, const char*)':
input_main.cpp:1163: warning: comparison is always false due to limited range of data type
input_main.cpp: In member function 'int CInputMain::MyShop(CHARACTER*, const char*, size_t)':
input_main.cpp:2937: warning: comparison is always false due to limited range of data type
In file included from item.cpp:22:
belt_inventory_helper.h: In static member function 'static BYTE CBeltInventoryHelper::GetBeltGradeByRefineLevel(int)':
belt_inventory_helper.h:28: warning: comparison between signed and unsigned integer expressions
item.h: In constructor 'CItem::CItem(DWORD)':
item.h:286: warning: 'CItem::m_pkRealTimeExpireEvent' will be initialized after
item.h:283: warning:   'LPEVENT CItem::m_pkExpireEvent'
item.cpp:25: warning:   when initialized here
item.cpp: In function 'const bool CanPutIntoRing(CItem*, CItem*)':
item.cpp:1725: warning: unused variable 'vnum'
item.cpp: In member function 'bool CItem::CanPutInto(CItem*)':
item.cpp:1758: warning: comparison between signed and unsigned integer expressions
item.cpp: In member function 'int CItem::GiveMoreTime_Per(float)':
item.cpp:2014: warning: comparison between signed and unsigned integer expressions
item.cpp:2016: warning: comparison between signed and unsigned integer expressions
item.cpp: In member function 'int CItem::GiveMoreTime_Fix(DWORD)':
item.cpp:2038: warning: comparison between signed and unsigned integer expressions
item.cpp: In member function 'int CItem::GetDuration()':
item.cpp:2069: warning: array subscript has type 'char'
input_auth.cpp: In member function 'int CInputAuth::auth_OpenID(const char*, const char*, char*)':
input_auth.cpp:467: warning: unused variable 'last'
 

 

Link to comment
Share on other sites

9 minutes ago, ErNabbone said:

As you can see, this time the error is in exchange.cpp;
you used "victim" without declare it:
"exchange.cpp: In constructor 'CExchange::CExchange(CHARACTER*)':
exchange.cpp:121: error: 'victim' was not declared in this scope"

 

 

[€dit]: "victim" used in line 121

Okey , I upload no edited files from Mainline_sg + I only change in db.cpp this what you wrote above , and this is my  BUILD ERROR LOG again. I don't know where I'm doing error in this :/ 

Spoiler

In file included from char.cpp:4:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char.cpp:25:
shop_manager.h:40:7: warning: no newline at end of file
In file included from char.cpp:62:
PetSystem.h:163:31: warning: no newline at end of file
char.cpp:7217: warning: this decimal constant is unsigned only in ISO C90
char.cpp:7225:2: warning: no newline at end of file
In file included from char_battle.cpp:27:
shop_manager.h:40:7: warning: no newline at end of file
In file included from char_horse.cpp:14:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char_item.cpp:44:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from char_item.cpp:47:
belt_inventory_helper.h:108:42: warning: no newline at end of file
In file included from char_state.cpp:25:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
In file included from PetSystem.cpp:8:
PetSystem.h:163:31: warning: no newline at end of file
In file included from PetSystem.cpp:9:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
PetSystem.cpp:637:2: warning: no newline at end of file
In file included from cmd_general.cpp:36:
../../common/VnumHelper.h:59:32: warning: no newline at end of file
constants.cpp:291: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:292: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:293: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:294: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:295: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:296: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:297: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:298: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:299: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:300: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:301: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:302: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:303: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:304: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:305: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:306: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:307: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:308: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:309: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:310: warning: this decimal constant is unsigned only in ISO C90
constants.cpp:311: warning: this decimal constant is unsigned only in ISO C90
char.cpp: In member function 'void CHARACTER::PointChange(BYTE, int, bool, bool)':
char.cpp:3088: warning: comparison between signed and unsigned integer expressions
In file included from char_item.cpp:47:
belt_inventory_helper.h: In static member function 'static BYTE CBeltInventoryHelper::GetBeltGradeByRefineLevel(int)':
belt_inventory_helper.h:28: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:640: warning: comparison is always false due to limited range of data type
char_item.cpp:666: warning: comparison is always false due to limited range of data type
char_item.cpp: In member function 'bool CHARACTER::UseItemEx(CItem*, TItemPos)':
char_item.cpp:2387: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2391: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2403: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2407: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:2434: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
char_item.cpp:2442: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
char_item.cpp:5087: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::UseItem(TItemPos, TItemPos)':
char_item.cpp:5159: warning: unused variable 'wDestCell'
char_item.cpp:5160: warning: unused variable 'bDestInven'
char_item.cpp: In member function 'bool CHARACTER::EquipItem(CItem*, int)':
char_item.cpp:6160: warning: array subscript has type 'char'
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_AddBuffsFromItem(CItem*)':
char_item.cpp:6224: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_RemoveBuffsFromItem(CItem*)':
char_item.cpp:6236: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::CanEquipNow(CItem*, const TItemPos&, const TItemPos&)':
char_item.cpp:7422: warning: unused variable 'itemType'
char_item.cpp:7423: warning: unused variable 'itemSubType'
In file included from desc_manager.cpp:15:
ClientPackageCryptInfo.h:117:41: warning: no newline at end of file
char_state.cpp: In member function 'virtual void CHARACTER::StateMove()':
char_state.cpp:901: warning: unused variable 'rider'
PetSystem.cpp: In member function 'virtual bool CPetActor::_UpdateFollowAI()':
PetSystem.cpp:246: warning: unused variable 'bDoMoveAlone'
PetSystem.cpp: In member function 'CPetActor* CPetSystem::Summon(DWORD, CItem*, const char*, bool, DWORD)':
PetSystem.cpp:552: warning: unused variable 'petVID'
db.cpp: In member function 'void DBManager::Query(const char*, ...)':
db.cpp:93: warning: comparison between signed and unsigned integer expressions
db.cpp: At global scope:
db.cpp:142: error: redefinition of 'void DBManager::ReturnQuery(int, DWORD, void*, const char*, ...)'
db.cpp:112: error: 'void DBManager::ReturnQuery(int, DWORD, void*, const char*, ...)' previously defined here
db.cpp:162: error: redefinition of 'SQLMsg* DBManager::PopResult()'
db.cpp:132: error: 'SQLMsg* DBManager::PopResult()' previously defined here
gmake: *** [OBJDIR/db.o] Error 1
gmake: *** Waiting for unfinished jobs....
In file included from config.cpp:22:
check_server.h: In static member function 'static bool CheckServer::CheckIp(const char*)':
check_server.h:24: warning: comparison between signed and unsigned integer expressions
config.cpp: In function 'void config_init(const std::string&)':
config.cpp:435: warning: NULL used in arithmetic
config.cpp:459: warning: NULL used in arithmetic
config.cpp:483: warning: NULL used in arithmetic
config.cpp:505: warning: unused variable 'line'
desc_client.cpp: In member function 'void CLIENT_DESC::UpdateChannelStatus(DWORD, bool)':
desc_client.cpp:299: warning: comparison between signed and unsigned integer expressions
cmd_gm.cpp: In function 'void do_set_stat(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:3935: warning: NULL used in arithmetic
cube.cpp: In function 'bool Cube_make(CHARACTER*)':
cube.cpp:544: warning: comparison between signed and unsigned integer expressions
cube.cpp: In function 'void Cube_MakeCubeInformationText()':
cube.cpp:716: warning: unused variable 'npcVNUM'
cube.cpp: In function 'bool Cube_InformationInitialize()':
cube.cpp:783: warning: comparison between signed and unsigned integer expressions
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:679: warning: control reaches end of non-void function
char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_ValueChange(BYTE, BYTE, BYTE)':
char_item.cpp:6271: warning: 'pBuff' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_use_item(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:4357: warning: 'cell' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_set_stat(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:3977: warning: 'n' may be used uninitialized in this function
cmd_gm.cpp: In function 'void do_mob_ld(CHARACTER*, const char*, int, int)':
cmd_gm.cpp:855: warning: 'x' may be used uninitialized in this function
cmd_gm.cpp:855: warning: 'y' may be used uninitialized in this function
 

 

Link to comment
Share on other sites

Ok, this time the error is
db.cpp: At global scope:
db.cpp:142: error: redefinition of 'void DBManager::ReturnQuery(int, DWORD, void*, const char*, ...)'
db.cpp:112: error: 'void DBManager::ReturnQuery(int, DWORD, void*, const char*, ...)' previously defined here
db.cpp:162: error: redefinition of 'SQLMsg* DBManager::PopResult()'
db.cpp:132: error: 'SQLMsg* DBManager::PopResult()' previously defined here

so I was wrong supposing that the 2nd function name is "DBManager::ReturnQuery":

 

43 minutes ago, ErNabbone said:

But I don't know which function is this:

(should be "void DBManager::ReturnQuery(int iType, DWORD dwIdent, void * pvData, const char * c_pszFormat, ...)" but I'm not sure)

 


{

	    char szQuery[4096];

	    va_list args;


 va_start(args, c_pszFormat);
    vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
    va_end(args);

    return m_sql_direct.DirectQuery(szQuery);
}

 

 

But there is also another similiar error here:
db.cpp:162: error: redefinition of 'SQLMsg* DBManager::PopResult()'
db.cpp:132: error: 'SQLMsg* DBManager::PopResult()' previously defined here

 

 

Don't you have a previous backup?

  • Love 1
Link to comment
Share on other sites

3 minutes ago, ErNabbone said:

Ok, this time the error is
db.cpp: At global scope:
db.cpp:142: error: redefinition of 'void DBManager::ReturnQuery(int, DWORD, void*, const char*, ...)'
db.cpp:112: error: 'void DBManager::ReturnQuery(int, DWORD, void*, const char*, ...)' previously defined here
db.cpp:162: error: redefinition of 'SQLMsg* DBManager::PopResult()'
db.cpp:132: error: 'SQLMsg* DBManager::PopResult()' previously defined here

so I was wrong supposing that the 2nd function name is "DBManager::ReturnQuery":

 

 

 

But there is also another similiar error here:
db.cpp:162: error: redefinition of 'SQLMsg* DBManager::PopResult()'
db.cpp:132: error: 'SQLMsg* DBManager::PopResult()' previously defined here

 

 

Don't you have a previous backup?

Thank you for your help :) it's compile now , the ERROR was in the db.cpp and, there was a space between VOID ;) .

But thank you for your help 

 

# TOPIC RESOLVED CAN BE CLOSED

  • Love 1
Link to comment
Share on other sites

  • 3 months later...

can anyone upload the .app?

 

Spoiler

compile db.cpp
db.cpp:95: error: declaration of 'SQLMsg* DBManager::DirectQuery(const char*, ...)' outside of class is not definition
db.cpp:96: error: expected unqualified-id before '{' token
db.cpp:115: error: declaration of 'void DBManager::ReturnQuery(int, DWORD, void*, const char*, ...)' outside of class is not definition
db.cpp:116: error: expected unqualified-id before '{' token
gmake[1]: *** [Makefile:120: OBJDIR/db.o] Error 1
gmake[1]: Leaving directory '/root/workspace/Server/game/src'
gmake: *** [Makefile:89: all] Error 2
gmake: Leaving directory '/root/workspace/Server'
 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



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.