Crash map-server

Psyz

New member
Messages
49
Points
0
Location
Fortaleza-BR
Github
juniiorsavio
Emulator
I'm constantly receiving this alert and my map is falling without any kind of warning, so I can't identify the problem itself to fix, can someone help me?

Code:
: DB error - Incorrect table name ''
[Debug]: at npc.c:1669 - SELECT `name`, `itemId`, `amount`, `priceId`, `priceAmount` FROM ``

 
/**
* Loads persistent NPC Barter Data from SQL
**/
static void npc_barter_fromsql(void)
{
struct SqlStmt *stmt = SQL->StmtMalloc(map->mysql_handle);
char name[NAME_LENGTH + 1];
int itemid;
int amount;
int removeId;
int removeAmount;

if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemId`, `amount`, `priceId`, `priceAmount` FROM `%s`", map->npc_barter_data_db)
|| SQL_ERROR == SQL->StmtExecute(stmt)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
return;
}


npc_barter_data_db is
https://github.com/HerculesWS/Hercules/blob/stable/conf/common/inter-server.conf#L120

npc_barter_data_db: "npc_barter_data"




means you are missing a table name `npc_barter_data`

https://github.com/HerculesWS/Hercules/blob/stable/sql-files/upgrades/2018-12-29--07-51.sql

how can you ignore the SQL update file ?

 
in fact I didn’t ignore it, my emulator didn’t ask, I use a “custom” version made by me, I believe I missed it.

thank you very much

 
/**
* Loads persistent NPC Barter Data from SQL
**/
static void npc_barter_fromsql(void)
{
struct SqlStmt *stmt = SQL->StmtMalloc(map->mysql_handle);
char name[NAME_LENGTH + 1];
int itemid;
int amount;
int removeId;
int removeAmount;

if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemId`, `amount`, `priceId`, `priceAmount` FROM `%s`", map->npc_barter_data_db)
|| SQL_ERROR == SQL->StmtExecute(stmt)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
return;
}

/**
* Loads persistent NPC Barter Data from SQL
**/
static void npc_barter_fromsql(void)
{
struct SqlStmt *stmt = SQL->StmtMalloc(map->mysql_handle);
char name[NAME_LENGTH + 1];
int itemid;
int amount;
int removeId;
int removeAmount;

if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemId`, `amount`, `priceId`, `priceAmount` FROM `%s`", map->npc_barter_data_db)
|| SQL_ERROR == SQL->StmtExecute(stmt)
) {
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
return;
}


npc_barter_data_db is
https://github.com/HerculesWS/Hercules/blob/stable/conf/common/inter-server.conf#L120

npc_barter_data_db: "npc_barter_data"

npc_barter_data_db: "npc_barter_data"




means you are missing a table name `npc_barter_data`

https://github.com/HerculesWS/Hercules/blob/stable/sql-files/upgrades/2018-12-29--07-51.sql

how can you ignore the SQL update file ?
the problem was related to storage package

 
Back
Top