• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

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;
 
Junior Spellweaver
Joined
Jun 14, 2015
Messages
123
Reaction score
20
You should go ask the people involved in the project, no one else can you tell you anything based on some random, unformatted blob of code
 
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
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.
 
Joined
May 23, 2008
Messages
1,071
Reaction score
574
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
Top