uint32_t IOLoginData::getCheckPlayerLevel(const std::string& name) const
{
Database* db = Database::getInstance();
DBQuery query;
query << "SELECT `level` FROM `players` WHERE `name` " << db->getStringComparison() << " " << db->escapeString(name) << ";";
DBResult* result;
if(!(result = db->storeQuery(query.str())))
return false;
const uint32_t pLevel = result->getDataInt("level");
result->free();
return pLevel;
}
@ up
sources\iologindata.cpp In member function `uint32_t IOLoginData::getCheckPlayerLevel(const std::string&) const':
sources\iologindata.cpp 'class _Database' has no member named 'getStringComparisonOperator'
sources\dev-cpp\Makefile.win [Build Error] [obj//iologindata.o] Error 1
Fail =(
bump! for this my chilean friend~
is there any way to make this without compile?.. actually i dont have the source files of the OT im running :'c
uint32_t getAccountIdByName(const std::string& name) const;
uint32_t getCheckPlayerLevel(const std::string& name) const;
uint32_t IOLoginData::getCheckPlayerLevel(const std::string& name) const
{
Database* db = Database::getInstance();
DBQuery query;
query << "SELECT `level` FROM `players` WHERE `name` " << db->getStringComparer() << db->escapeString(name) << ";";
DBResult* result;
if(!(result = db->storeQuery(query.str())))
return false;
const uint32_t pLevel = result->getDataInt("level");
result->free();
return pLevel;
}
for(Characters::iterator it = account.charList.begin(); it != account.charList.end(); it++)
char levelText[50];
output->putString(g_config.getString(ConfigManager::SERVER_NAME));
//output->putString(g_config.getString(ConfigManager::SERVER_NAME));
sprintf(levelText, "Lvl: %d", IOLoginData::getInstance()->getCheckPlayerLevel((*it)));
output->putString(levelText);
protocollogin.cpp: In member function âbool ProtocolLogin::parseFirstPacket(NetworkMessage&)â:
protocollogin.cpp:206: error: âlevelTextâ was not declared in this scope
protocollogin.cpp:206: error: name lookup of âitâ changed for ISO âforâ scoping
protocollogin.cpp:206: note: (if you use â-fpermissiveâ G++ will accept your code)
protocollogin.cpp:206: error: no matching function for call to âIOLoginData::getCheckPlayerLevel(std::pair<unsigned int, unsigned int>&)â
iologindata.h:102: note: candidates are: uint32_t IOLoginData::getCheckPlayerLevel(const std::string&) const
make[1]: *** [protocollogin.o] Error 1
make[1]: *** Se espera a que terminen otras tareas....
make[1]: se sale del directorio `/home/serv/sources_r11_dupe'
make: *** [all] Error 2
protocollogin.cpp: In member function âbool ProtocolLogin :: parseFirstPacket (NetworkMessage &) â:
protocollogin.cpp: 206: error: âlevelTextâ Declared In This not was scope
protocollogin.cpp: 206: error: name lookup of Aita changed for ISO Afora scoping
protocollogin.cpp: 206: note: (if you use beta-fpermissiveâ G + + will accept your code)
protocollogin.cpp: 206: error: no matching function for call to âIOLoginData :: getCheckPlayerLevel (std :: pair <unsigned int> int, unsigned &) â
iologindata.h: 102: note: candidates are: :: uint32_t IOLoginData getCheckPlayerLevel (const std :: string &) const
make [1]: *** [protocollogin.o] Error 1
make [1]: *** is expected to finish other tasks ....
make [1]: Leaving directory `/ home/serv/sources_r11_dupe '
make: *** [all] Error 2
before ?char levelText[50];
for(Characters::iterator it = account.charList.begin(); it != account.charList.end(); it++)
char levelText[50];
for(Characters::iterator it = account.charList.begin(); it != account.charList.end(); it++
sprintf(levelText, "Lvl: %d", IOLoginData::getInstance()->getCheckPlayerLevel((*it)));
output->putString(levelText);
char levelText[50];
for(Characters::iterator it = account.charList.begin(); it != account.charList.end(); it++)
{
#ifndef __LOGIN_SERVER__
output->putString((*it));
if(g_config.getBool(ConfigManager::ON_OR_OFF_CHARLIST))
{
if(g_game.getPlayerByName((*it)))
output->putString("Online");
else
output->putString("Offline");
}
else
//output->putString(g_config.getString(ConfigManager::SERVER_NAME));
sprintf(levelText, "Lvl: %d", IOLoginData::getInstance()->getCheckPlayerLevel((*it)));
output->putString(levelText);
output->put<uint32_t>(serverIp);
output->put<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));
iologindata.cpp:1769: error: expected initializer before âuint32_tâ
iologindata.cpp:1784: error: expected unqualified-id before â{â token
make[1]: *** [iologindata.o] Error 1
make[1]: *** Se espera a que terminen otras tareas....
make[1]: se sale del directorio `/home/serv/sources_r11_dupe/sources_r11_dupe'
make: *** [all] Error 2