Krusty 32 Posted February 22, 2015 Share Posted February 22, 2015 const long long GOLD_MAX = 2000000000LL dont work Link to comment Share on other sites More sharing options...
Former Staff .InyaProduction 1118 Posted February 22, 2015 Former Staff Share Posted February 22, 2015 const long long GOLD_MAX = 2000000000LL dont work You have to put it outside of the enum Link to comment Share on other sites More sharing options...
Syron 296 Posted February 22, 2015 Share Posted February 22, 2015 (edited) I tried this today , didn't succed. Seems to complicate. PythonPlayerModule.cpp - UnsignedLongLong PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } lenght.h - GOLD_MAX = 999990000000ULL, tables.h - long long gold; Edit: I removed it completely , a complete tutorial on this would be helpful. Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Reboot 770 Posted February 22, 2015 Share Posted February 22, 2015 FOR syron This is correct : Lenght.h = 999990000000ULL tables.h = unsigned long long gold; In PythonPlayerModule.cpp you have ( ULL = Unsigned long long) In PythonPlayerModule.cpp : Change this : PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } With this PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("ULL", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } I don't know what's so hard. Link to comment Share on other sites More sharing options...
Syron 296 Posted February 22, 2015 Share Posted February 22, 2015 FOR syron This is correct : Lenght.h = 999990000000ULL tables.h = unsigned long long gold; In PythonPlayerModule.cpp you have ( ULL = Unsigned long long) In PythonPlayerModule.cpp : Change this : PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } With this PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("ULL", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } I don't know what's so hard. ClientManagerBoot.cpp:1216: warning: format '%d' excepts type 'int', but argument 37 has type 'long int' ClinetManagerPlayer.cpp:887: warning: format '%d' excepts type 'int', but argument 26 has type 'long long unsigned int' When compiling DB , don't know where i didn't edited. ( probably common folder because i compiled game succesfully. ) Link to comment Share on other sites More sharing options...
Active Member hachiwari 138 Posted February 22, 2015 Active Member Share Posted February 22, 2015 FOR syron This is correct : Lenght.h = 999990000000ULL tables.h = unsigned long long gold; In PythonPlayerModule.cpp you have ( ULL = Unsigned long long) In PythonPlayerModule.cpp : Change this : PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("i", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } With this PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return Py_BuildValue("ULL", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } I don't know what's so hard. ClientManagerBoot.cpp:1216: warning: format '%d' excepts type 'int', but argument 37 has type 'long int' ClinetManagerPlayer.cpp:887: warning: format '%d' excepts type 'int', but argument 26 has type 'long long unsigned int' When compiling DB , don't know where i didn't edited. ( probably common folder because i compiled game succesfully. ) Change %d with %llu Link to comment Share on other sites More sharing options...
Syron 296 Posted February 22, 2015 Share Posted February 22, 2015 (edited) I'm back to this again... ( Unsigned Long Long in Binary ) After yang exceeds 2kkk: Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
jma96 1 Posted February 22, 2015 Share Posted February 22, 2015 (edited) I'm back to this again... ( Unsigned Long Long in Binary ) After yang exceeds 2kkk: Same problem, i dont knouw if we are doing something wrong or reboot do not fully understand the problem. T.T Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Syron 296 Posted February 22, 2015 Share Posted February 22, 2015 (edited) I'm back to this again... ( Unsigned Long Long in Binary ) After yang exceeds 2kkk: Same problem, i dont knouw if we are doing something wrong or reboot do not fully understand the problem. T.T After an update of DB , in "gold" column it turns in "9223372036854775807" which is maximum value of unsigned long long ( 922.337.036.854.775.807 Yang / 922kkkkk ) Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
V1ru7 3 Posted February 24, 2015 Share Posted February 24, 2015 i have this problem too, please help:( Link to comment Share on other sites More sharing options...
V1ru7 3 Posted February 25, 2015 Share Posted February 25, 2015 BUMP Link to comment Share on other sites More sharing options...
Premium Dash 81 Posted March 2, 2015 Premium Share Posted March 2, 2015 (edited) I tried this today , didn't succed. Seems to complicate. PythonPlayerModule.cpp - UnsignedLongLong PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } lenght.h - GOLD_MAX = 999990000000ULL, tables.h - long long gold; Edit: I removed it completely , a complete tutorial on this would be helpful. BUMP same In navicat i have a negative value -1193967296 Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Dash 81 Posted March 3, 2015 Premium Share Posted March 3, 2015 Up 1 Link to comment Share on other sites More sharing options...
5230pati 0 Posted March 14, 2015 Share Posted March 14, 2015 (edited) Hello I successfully increased the max gold in serverside, but in client it doesnt want to show the correct value of gold :https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif i tried this codes: return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); return PyLong_FromLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); Py_BuildValue("l", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); Py_BuildValue("ll", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); Py_BuildValue("K", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); these codes shows that value whic is on the picture with Py_BuildValue("ull", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); it shows the max value of ULL : dows somebody know the code which shows the correct value? Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Dennis 166 Posted March 25, 2015 Share Posted March 25, 2015 (edited) Hello I successfully increased the max gold in serverside, but in client it doesnt want to show the correct value of gold : https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif i tried this codes: return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); return PyLong_FromLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); Py_BuildValue("l", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); Py_BuildValue("ll", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); Py_BuildValue("K", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); these codes shows that value whic is on the picture with Py_BuildValue("ull", CPythonPlayer::Instance().GetStatus(POINT_GOLD)); it shows the max value of ULL : dows somebody know the code which shows the correct value? I have the same problem. i have a positive vaule in my db but client show = 247.872.648.810.861.568. in db is 66.000.000.000 And when the value in DB = 0 in client show = 250.405.922.025.766.912 What is wrong ? Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Dash 81 Posted March 25, 2015 Premium Share Posted March 25, 2015 DWORD dash = CPythonPlayer::Instance().GetStatus(POINT_GOLD); Return Py_BuildValue("l",dash); For 4.000.000.000 Try with long long dash and "L" Link to comment Share on other sites More sharing options...
Dennis 166 Posted March 25, 2015 Share Posted March 25, 2015 DWORD dash = CPythonPlayer::Instance().GetStatus(POINT_GOLD); Return Py_BuildValue("l",dash); For 4.000.000.000 Try with long long dash and "L" Thx Dash but dont work... I have only change PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) in client source have forget what? but the vaule in client is now 352.289.280 Yang and DB value = 300000000000 Here my Changes game and Client: Game: char.cpp case POINT_GOLD: { long long GoldAmount = 0; const int64_t nTotalMoney = GetGold() + GoldAmount; if (GOLD_MAX <= nTotalMoney) { sys_err("[OVERFLOW_GOLD] OriGold %d AddedGold %d id %u Name %s ", GetGold(), GoldAmount, GetPlayerID(), GetName()); //LogManager::instance().CharLog(this, GetGold() + amount, "OVERFLOW_GOLD", ""); return; } SetGold(GetGold() + GoldAmount); goldval = GetGold(); } break; char.h typedef struct character_point { long points[POINT_MAX_NUM]; BYTE job; BYTE voice; BYTE level; DWORD exp; long long gold; int hp; int sp; int iRandomHP; int iRandomSP; int stamina; BYTE skill_group; } CHARACTER_POINT; // Money related long long GetGold() const { return m_points.gold; } void SetGold(long long gold) { m_points.gold = gold; } bool DropGold(INT gold); INT GetAllowedGold() const; void GiveGold(INT iAmount); // ÆÄƼ°¡ ÀÖÀ¸¸é ÆÄƼ ºÐ¹è, ·Î±× µîÀÇ Ã³¸® // End of Money config.cpp long long GOLD_MAX = 1000000000000000000LL; tables.h typedef struct SPlayerTable { DWORD id; char name[CHARACTER_NAME_MAX_LEN + 1]; char ip[IP_ADDRESS_LENGTH + 1]; WORD job; BYTE voice; BYTE level; BYTE level_step; short st, ht, dx, iq; DWORD exp; long long gold; BYTE dir; INT x, y, z; INT lMapIndex; long lExitX, lExitY; long lExitMapIndex; long hp; long sp; short sRandomHP; short sRandomSP; int playtime; short stat_point; short skill_point; short sub_skill_point; short horse_skill_point; TPlayerSkill skills[SKILL_MAX_NUM]; TQuickslot quickslot[QUICKSLOT_MAX_NUM]; BYTE part_base; WORD parts[PART_MAX_NUM]; short stamina; BYTE skill_group; long lAlignment; char szMobile[MOBILE_MAX_LEN + 1]; short stat_reset_count; THorseInfo horse; DWORD logoff_interval; int aiPremiumTimes[PREMIUM_MAX_NUM]; } TPlayerTable; Client: PythonPlayerModule.cpp PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { __int64 GoldVal = CPythonPlayer::Instance().GetStatus(POINT_GOLD); return Py_BuildValue("L", GoldVal); } Link to comment Share on other sites More sharing options...
Morphe 158 Posted March 25, 2015 Author Share Posted March 25, 2015 try const long long nTotalMoney = GetGold() + GoldAmount; and make all getgold %d in %lld Link to comment Share on other sites More sharing options...
Premium Dash 81 Posted March 25, 2015 Premium Share Posted March 25, 2015 try const long long nTotalMoney = GetGold() + GoldAmount; and make all getgold %d in %lld In client source? Link to comment Share on other sites More sharing options...
Dennis 166 Posted March 25, 2015 Share Posted March 25, 2015 try const long long nTotalMoney = GetGold() + GoldAmount; and make all getgold %d in %lld In client source? no in the game source in char.cpp Link to comment Share on other sites More sharing options...
Premium Dash 81 Posted March 28, 2015 Premium Share Posted March 28, 2015 PyModule_AddIntConstant(PyObject *module, const char *name, long value)¶ No way to change a maximum value , will be long anyway... Link to comment Share on other sites More sharing options...
Cilindro 14 Posted July 25, 2015 Share Posted July 25, 2015 (edited) any one can help me i have the problem the money when i buy or drop or trade yang it's auto coming 0 yang when i reload then i have the correct money on inventory any one waht i need to make ? the money it's work but when buy any thing or drop it's coming 0 and need too reload on client for show again the real money. Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Haades 5 Posted July 27, 2015 Share Posted July 27, 2015 (edited) any one can help me i have the problem the money when i buy or drop or trade yang it's auto coming 0 yang when i reload then i have the correct money on inventory any one waht i need to make ? the money it's work but when buy any thing or drop it's coming 0 and need too reload on client for show again the real money. I have the same problem.. Somebody know how to fix it? If my yang value is > max int value (2,1kkk), yangs in inventory after update set 0, if i logout and login yang value is again correct... And my next problem: Items from my inventory disappeared. If i give item to my inventory, after relog missing... Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Cilindro 14 Posted July 27, 2015 Share Posted July 27, 2015 i solve my problem but now i try to make shop with more then 2kkk any whan have idea i can make shop bur then show very big nummbers. Link to comment Share on other sites More sharing options...
Haades 5 Posted July 27, 2015 Share Posted July 27, 2015 i solve my problem but now i try to make shop with more then 2kkk any whan have idea i can make shop bur then show very big nummbers. Can u tell me how you fix it? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now