need help with an undeclared identifier

Results 1 to 4 of 4
  1. #1
    Apprentice scorp12 is offline
    MemberRank
    Nov 2013 Join Date
    15Posts

    need help with an undeclared identifier

    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;


  2. #2
    Valued Member Keristrasza is offline
    MemberRank
    Jun 2015 Join Date
    128Posts

    Re: need help with an undeclared identifier

    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

  3. #3
    need help with an undeclared identifier Future is offline
    LegendRank
    Dec 2011 Join Date
    2,265Posts

    Re: need help with an undeclared identifier

    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.

  4. #4
    Software Person TimeBomb is offline
    ModeratorRank
    May 2008 Join Date
    United StatesLocation
    1,252Posts

    Re: need help with an undeclared identifier

    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.



Advertisement