need help with an undeclared identifier

Status
Not open for further replies.
Newbie Spellweaver
Joined
Nov 23, 2013
Messages
14
Reaction score
0
when trying to build this project i am getting constant errors for undeclared identifiers of "use" and "now"

the asterix below indicate where the line is thats the problem





#include "includes.h"#include "Alliance.h"#include "AllianceCore.h"#include "Server.h"#include "Client.h"Alliance::Alliance(Server * main, string name, int32_t ownerid){ enemyactioncooldown = 0; m_ownerid = ownerid; m_name = name; m_members.clear(); m_enemies.clear(); m_allies.clear(); m_neutral.clear(); m_currentmembers = 0; m_maxmembers = 500; //m_members.push_back(ownerid); m_prestige = 0; m_honor = 0; m_prestigerank = 0; m_honorrank = 0; m_membersrank = 0; m_main = main; m_owner = m_main->GetClient(ownerid)->m_playername; m_citycount = 0;}Alliance::~Alliance(){}bool Alliance::InsertToDB(){ typedef Poco::Tuple<string, string, string, int64_t> AllianceSave; //name, founder, leader AllianceSave savedata(m_name, m_founder, m_owner, unixtime()); try { Session ses(m_main->serverpool->get());******* ses << "INSERT INTO `alliances` (name,founder,leader,created) VALUES (?,?,?,?);", use(savedata), now; Statement lastinsert = (ses << "SELECT LAST_INSERT_ID()"); lastinsert.execute(); RecordSet lsi(lastinsert); lsi.moveFirst(); int64_t lsiv = lsi.value("LAST_INSERT_ID()").convert<int64_t>(); if (lsiv > 0) { m_allianceid = lsiv;
 
You should seriously consider putting [ CODE ] tags around your code... It cannot be expected that one tries to decipher this block.

Most likely these keywords should be in your Query string or you're missing includes / declaration of the undefined types. The error makes clear what the problem is and without dumping your whole project here (which is not advisable) it's impossible to solve for anyone here.
 
I share the same sentiment as Keristrasza and Future. I don't think we have enough info here to help you all that much. This thread is also breaking section rule #5 in my opinion. Closing this thread. If you decide to create a new thread about this after putting in more effort to try to solve it, do make sure to elaborate on what you've already tried. Cheers.
 
Status
Not open for further replies.
Back