Jump to content
  • 0
Sign in to follow this  
Psyz

Crash map-server

Question

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?

 

: DB error - Incorrect table name ''


[Debug]: at npc.c:1669 - SELECT `name`, `itemId`, `amount`, `priceId`, `priceAmount` FROM ``

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
/**
 * 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 ?

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, AnnieRuru said:

/** * 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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.