[Release] auto save function [FIXED!]

Page 2 of 9 FirstFirst 123456789 LastLast
Results 16 to 30 of 130
  1. #16
    Proficient Member 2azn4u is offline
    MemberRank
    Sep 2007 Join Date
    Down Under....Location
    156Posts

    Re: [Release] auto save function

    yeh but i suggest that you dont

  2. #17
    Valued Member vioLy is offline
    MemberRank
    Apr 2008 Join Date
    101Posts

    Re: [Release] auto save function

    3>LINK : fatal error LNK1104: cannot open file '.\Debug\Autosave.obj'

    ..

    Edit: fixed the linker but it's still crashing my server completely the second everything is done initializing.

  3. #18
    Alpha Member WGFreak is offline
    MemberRank
    Jun 2007 Join Date
    Planet Earth.Location
    1,469Posts

    Re: [Release] auto save function

    1>AutoSave.cpp
    1>d:\documents and settings\arrio\desktop\revision 003\maplestoryserver\007\maplestoryserver\autosave.cpp(21) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
    1> d:\program files\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    1>d:\documents and settings\arrio\desktop\revision 003\maplestoryserver\007\maplestoryserver\autosave.cpp(21) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
    1> d:\program files\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    1>d:\documents and settings\arrio\desktop\revision 003\maplestoryserver\007\maplestoryserver\autosave.cpp(22) : error C2227: left of '->second' must point to class/struct/union/generic type
    1> type is 'list<_Hash<_Traits>::_Traits::value_type,_Hash<_Traits>::_Traits::allocator_type>::iterator'
    1>d:\documents and settings\arrio\desktop\revision 003\maplestoryserver\007\maplestoryserver\autosave.cpp(22) : error C2227: left of '->save' must point to class/struct/union/generic type
    Thats the best i can fix.

  4. #19
    Proficient Member 2azn4u is offline
    MemberRank
    Sep 2007 Join Date
    Down Under....Location
    156Posts

    Re: [Release] auto save function

    Quote Originally Posted by ctZ'... View Post
    Code:
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(19) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
            c:\programas\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(19) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
            c:\programas\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(20) : error C2227: left of '->second' must point to class/struct/union/generic type
            type is 'list<_Hash<_Traits>::_Traits::value_type,_Hash<_Traits>::_Traits::allocator_type>::iterator'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(20) : error C2227: left of '->save' must point to class/struct/union/generic type
    Any idea how to fix it?

    here my edited part of player.cpp, i don't think i did something wront but :\
    Code:
    Player::~Player(){
    	if(isconnect){
    		Maps::removePlayer(this);
    		Players::deletePlayer(this);
                    save();
                    Skills::stopTimerPlayer(this);
    		isconnect= false;
    	}
    }
    void Player::save() {
    			char sql[2000];
    		sprintf_s(sql, 2000, "update keymap set ");
    		for(int i=0; i<90; i++){
    			char temp[100];
    			if(i!=89)
    				sprintf_s(temp, 100, "pos%d=%d, ", i, keys[i]);
    			else
    				sprintf_s(temp, 100, "pos%d=%d where charid=%d; ", i, keys[i], getPlayerid());
    			strcat_s(sql, 2000, temp);
    		}
    		MySQL::insert(sql);
    		sprintf_s(sql, 2000, "update characters set level=%d, job=%d, str=%d, dex=%d, intt=%d, luk=%d, chp=%d, mhp=%d, cmp=%d, mmp=%d, ap=%d, sp=%d, exp=%d, fame=%d, map=%d, gender=%d, skin=%d, eyes=%d, hair=%d, mesos=%d where id=%d", getLevel(), getJob(), getStr(), getDex(), getInt(), getLuk(), getHP(), getMHP(), getMP(), getMMP(), getAp(), getSp(), getExp(), getFame(), getMap(), getGender(), getSkin(), getEyes(), getHair(), inv->getMesos() ,getPlayerid());
    		MySQL::insert(sql);
    		char temp[100];
    		sprintf_s(temp, 100, "where charid=%d;", getPlayerid());
    		strcat_s(sql, 2000, temp);
    		MySQL::insert(sql);
    		sprintf_s(sql, 2000, "delete from equip where charid=%d;", getPlayerid());
    		MySQL::insert(sql);
    		for(int i=0; i<inv->getEquipNum(); i++){
    			sprintf_s(sql, 2000, "insert into equip values(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d);", inv->getEquip(i)->id, Drops::equips[inv->getEquip(i)->id].type ,getPlayerid(), inv->getEquipPos(i), inv->getEquip(i)->slots, inv->getEquip(i)->scrolls,
    				inv->getEquip(i)->istr, inv->getEquip(i)->idex, inv->getEquip(i)->iint, inv->getEquip(i)->iluk, inv->getEquip(i)->ihp, inv->getEquip(i)->imp, inv->getEquip(i)->iwatk, inv->getEquip(i)->imatk, inv->getEquip(i)->iwdef, 
    				inv->getEquip(i)->imdef, inv->getEquip(i)->iacc, inv->getEquip(i)->iavo, inv->getEquip(i)->ihand, inv->getEquip(i)->ijump, inv->getEquip(i)->ispeed);
    			MySQL::insert(sql);
    		}
    		sprintf_s(sql, 2000, "delete from skills where charid=%d;", getPlayerid());
    		MySQL::insert(sql);
    		for(int i=0; i<skills->getSkillsNum(); i++){
    			sprintf_s(sql, 2000, "insert into skills values(%d, %d, %d)", getPlayerid(), skills->getSkillID(i), skills->getSkillLevel(skills->getSkillID(i)));
    			MySQL::insert(sql);
    		}
    		sprintf_s(sql, 2000, "delete from items where charid=%d;", getPlayerid());
    		MySQL::insert(sql);
    		for(int i=0; i<inv->getItemNum(); i++){
    			sprintf_s(sql, 2000, "insert into items values(%d, %d, %d, %d, %d);", inv->getItem(i)->id, getPlayerid() ,inv->getItem(i)->inv, inv->getItem(i)->pos, inv->getItem(i)->amount);
    			MySQL::insert(sql);
    		}
    
    }
    edited it for you

  5. #20
    Account Upgraded | Title Enabled! mariokiller64 is offline
    MemberRank
    Oct 2006 Join Date
    392Posts

    Re: [Release] auto save function

    Technically its
    Code:
    add 
    #include"AutoSave.h"

    instead of adding just autosave in the maplestoryserver.cpp :P

  6. #21
    Account Upgraded | Title Enabled! ctZ'... is offline
    MemberRank
    Dec 2006 Join Date
    533Posts

    Re: [Release] auto save function

    Code:
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(19) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
            c:\programas\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(19) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
            c:\programas\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(20) : error C2227: left of '->second' must point to class/struct/union/generic type
            type is 'list<_Hash<_Traits>::_Traits::value_type,_Hash<_Traits>::_Traits::allocator_type>::iterator'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(20) : error C2227: left of '->save' must point to class/struct/union/generic type
    i used ur edited player.cpp, but i still get that error :\

  7. #22
    Account Upgraded | Title Enabled! ctZ'... is offline
    MemberRank
    Dec 2006 Join Date
    533Posts

    Re: [Release] auto save function

    Quote Originally Posted by mariokiller64 View Post
    Technically its
    Code:
    add 
    #include"AutoSave.h"
    instead of adding just autosave in the maplestoryserver.cpp :P
    All you need is common sense for that one. :\

  8. #23
    Alpha Member WGFreak is offline
    MemberRank
    Jun 2007 Join Date
    Planet Earth.Location
    1,469Posts

    Re: [Release] auto save function

    Quote Originally Posted by mariokiller64 View Post
    Technically its
    Code:
    add 
    #include"AutoSave.h"
    instead of adding just autosave in the maplestoryserver.cpp :P
    THats not the problem since that is in the instruction.

    Quote Originally Posted by ctZ'... View Post
    Code:
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(19) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
            c:\programas\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(19) : error C2955: 'stdext::hash_map' : use of class template requires template argument list
            c:\programas\microsoft visual studio 9.0\vc\include\hash_map(87) : see declaration of 'stdext::hash_map'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(20) : error C2227: left of '->second' must point to class/struct/union/generic type
            type is 'list<_Hash<_Traits>::_Traits::value_type,_Hash<_Traits>::_Traits::allocator_type>::iterator'
    d:\games\fantasyms project\server\serversource\maplestoryserver\autosave.cpp(20) : error C2227: left of '->save' must point to class/struct/union/generic type
    i used ur edited player.cpp, but i still get that error :\
    me too.

    Dont double post btw.

  9. #24
    Account Upgraded | Title Enabled! ctZ'... is offline
    MemberRank
    Dec 2006 Join Date
    533Posts

    Re: [Release] auto save function

    Didn't mean it, pure randomness, sorry ;)

  10. #25
    Enthusiast VibeDev is offline
    MemberRank
    Apr 2008 Join Date
    38Posts

    Re: [Release] auto save function

    This is an awful method.
    Do it like gMS does it. ;)

  11. #26
    Proficient Member Xterminatorz is offline
    MemberRank
    Apr 2008 Join Date
    CaliforniaLocation
    168Posts

    Re: [Release] auto save function

    I have added this with no error. Just haven't tested it yet.

  12. #27
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: [Release] auto save function

    i added this and my server crashes on drops buffer is too small

  13. #28
    Account Upgraded | Title Enabled! xnBlaze is offline
    MemberRank
    Apr 2008 Join Date
    860Posts

    Re: [Release] auto save function

    thanks for this :] going to try it out.

  14. #29
    Account Upgraded | Title Enabled! xnBlaze is offline
    MemberRank
    Apr 2008 Join Date
    860Posts

    Re: [Release] auto save function

    I got an idea, instead of "auto saved" showing text, it should just not show so its completely normal.

  15. #30
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: [Release] auto save function

    blaze do u know why this system makes my drop buffer too small?



Advertisement