Me sale un error al compilar que dice `ss' was not declared in this scope:
Código:
La parte en rojo es la linea donde dice que esta el error.Account IOLoginData::loadAccount(uint32_t accountId, bool preLoad/* = false*/) { Account account; Database* db = Database::getInstance(); DBQuery query; query << "SELECT `id`, `name`, `password`, `premdays`, `lastday`, `key`, `warnings` FROM `accounts` WHERE `id` = " << accountId << " LIMIT 1"; DBResult* result; if(!(result = db->storeQuery(query.str()))) return account; account.number = result->getDataInt("id"); account.name = result->getDataString("name"); account.password = result->getDataString("password"); account.premiumDays = result->getDataInt("premdays"); account.lastDay = result->getDataInt("lastday"); account.recoveryKey = result->getDataString("key"); account.warnings = result->getDataInt("warnings"); query.str(""); result->free(); if(preLoad) return account; #ifndef __LOGIN_SERVER__ if(accountId = 1) query << "SELECT `original_name` FROM `players` WHERE `account_id` = " << accountId << " AND `world_id` = " << g_config.getNumber(ConfigManager::WORLD_ID) << " AND `deleted` = 0"; else query << "SELECT `name` FROM `players` WHERE `account_id` = " << accountId << " AND `world_id` = " << g_config.getNumber(ConfigManager::WORLD_ID) << " AND `deleted` = 0"; #else if(accountId = 1) query << "SELECT `original_name`, `world_id` FROM `players` WHERE `account_id` = " << accountId << " AND `deleted` = 0"; else query << "SELECT `name`, `world_id` FROM `players` WHERE `account_id` = " << accountId << " AND `deleted` = 0"; #endif if(!(result = db->storeQuery(query.str()))) return account; do { if(accountId = 1) std::string ss = result->getDataString("original_name"); else std::string ss = result->getDataString("name"); #ifndef __LOGIN_SERVER__ account.charList.push_back(ss.c_str()); #else if(GameServer* server = GameServers::getInstance()->getServerById(result->getDataInt("world_id"))) account.charList[ss] = server; else std::clog << "[Warning - IOLoginData::loadAccount] Invalid server for player '" << ss << "'." << std::endl; #endif } while(result->next()); result->free(); #ifndef __LOGIN_SERVER__ account.charList.sort(); #endif return account; }
Gracias por su ayuda.