Former Staff flygun 304 Posted July 6, 2016 Former Staff Share Posted July 6, 2016 Hey guys one week ago and by accident all my work have been deleted ... i manged to recover 80% of them but unfortunately i couldn't recover my FreeBSD OS ... so I've created a new topic to get some advice on "what to do next" so I've decided to compile and run the game on windows which is better environment for debugging so I've managed to compile every thing all over again now i'm stuck with a very stupid error which is : in db/conf.txt i got those lines SQL_ACCOUNT = "localhost account user pass 0" SQL_PLAYER = "localhost player user pass 0" SQL_COMMON = "localhost common user pass 0" SQL_HOTBACKUP = "localhost hotbackup user pass 0" in db/main.cpp if (CConfig::instance().GetValue("SQL_PLAYER", line, 256)) { sscanf(line, " %s %s %s %s %d ", szAddr, szDB, szUser, szPassword, &iPort); sys_log(0, "Connecting to SQL_PLAYER"); int iRetry = 5; do { if (CDBManager::instance().Connect(SQL_PLAYER, szAddr, iPort, szDB, szUser, szPassword)) { sys_log(0, "Connected to SQL_PLAYER"); break; } sys_log(0, " failed, retrying in 5 seconds"); fprintf(stderr, " failed, retrying in 5 seconds"); sleep(5); } while (iRetry--); fprintf(stderr, "Success PLAYER\n"); SetPlayerDBName(szDB); } else { sys_err("SQL_PLAYER not configured"); return false; } SYSERR: Jul 06 10:40:49 :: CAsyncSQL::ChildLoop: AsyncSQL: query failed: Table 'account.guild' doesn't exist (query: SELECT id,name,ladder_point FROM guild ORDER BY ladder_point DESC LIMIT 20 errno: 1146) SYSERR: Jul 06 11:07:01 :: CAsyncSQL::ChildLoop: AsyncSQL: query failed: Table 'account.player_index' doesn't exist (query: SELECT pid1, pid2, pid3, pid4, empire FROM player_index WHERE id=1 errno: 1146) i can prevent this error by retyping the query but not in the way that it is suppose to be #update .... really weird problem i got this now AsyncSQL: query failed: Table 'common.guild' doesn't exist (query: SELECT id,name,ladder_point FROM guild ORDER BY ladder_point DESC LIMIT 20 errno: 1146) so now i can see the there is problem with the SQL query manager like this CDBManager::instance().ReturnQuery(szQuery, QID_GUILD_RANKING, 0, 0); // the last parameter determines which database to enter according to this enum enum eSQL_SLOT { SQL_PLAYER, SQL_ACCOUNT, SQL_COMMON, SQL_HOTBACKUP, SQL_MAX_NUM, }; i see that all the code are clean and right ... but the query are entering a random database as i can see sorry for my bad english Flygun Link to comment Share on other sites More sharing options...
Traceur3RUN 75 Posted July 7, 2016 Share Posted July 7, 2016 26 minutes ago, flygun said: #up im not sure understand but sysser show you. you don't have account.guild account player.index common.guild >> create it just Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted July 7, 2016 Author Former Staff Share Posted July 7, 2016 if (CDBManager::instance().Connect(SQL_PLAYER, szAddr, iPort, "player", szUser, szPassword)) { sys_log(0, "Connected to SQL_PLAYER"); break; } guild table must be in player ... the problem is that the SQL Manager puts a random database name query failed: Table 'account.guild' doesn't exist query failed: Table 'common.guild' doesn't exist see? and it not account or common it must be "player" i've got a temp fix like this if (CDBManager::instance().Connect(SQL_PLAYER, szAddr, iPort, "player", szUser, szPassword)) { sys_log(0, "Connected to SQL_PLAYER"); break; } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now