Jump to content

Source discussions, questions, answers


Recommended Posts

  • Honorable Member

Who can help me for my from errors?

ClientManagerPlayer.cpp: In member function 'char* CClientManager::GetCommand(char*)':
ClientManagerPlayer.cpp:433: warning: address of local variable 'command' returned
CsvReader.cpp: In member function 'const char* cCsvAlias::operator[](size_t) const':
CsvReader.cpp:72: warning: left-hand operand of comma has no effect
CsvReader.cpp:72: warning: right-hand operand of comma has no effect
CsvReader.cpp: In member function 'size_t cCsvAlias::operator[](const char*) const':
CsvReader.cpp:90: warning: left-hand operand of comma has no effect
CsvReader.cpp:90: warning: right-hand operand of comma has no effect

Thanks :)

 

Thats no error just warnings. You dont need to fix this.

 

Link to comment
Share on other sites

  • Bronze

Hello,

 

I tried to compile my source with this tutorial (click me) but I'm receiving these errors:

compile BattleArena.cpp
compile MarkConvert.cpp
compile MarkImage.cpp
compile MarkManager.cpp
compile OXEvent.cpp
compile TrafficProfiler.cpp
compile ani.cpp
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from MarkImage.cpp:1:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from MarkManager.cpp:1:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from MarkConvert.cpp:1:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
In file included from OXEvent.cpp:9:
char.h:729: error: integer constant is too large for 'long' type
In file included from cipher.h:6,
                 from desc.h:7,
                 from OXEvent.cpp:12:
../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from OXEvent.cpp:1:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
compile arena.cpp
In file included from ani.cpp:11:
char.h:729: error: integer constant is too large for 'long' type
In file included from BattleArena.cpp:6:
char.h:729: error: integer constant is too large for 'long' type
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from BattleArena.cpp:1:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from ani.cpp:10:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
gmake: *** [OBJDIR/MarkImage.o] Error 1
gmake: *** Waiting for unfinished jobs....
gmake: *** [OBJDIR/MarkConvert.o] Error 1
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from TrafficProfiler.cpp:10:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
In file included from cipher.h:6,
                 from desc.h:7,
                 from arena.cpp:5:
../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type
gmake: *** [OBJDIR/MarkManager.o] Error 1
In file included from arena.cpp:9:
char.h:729: error: integer constant is too large for 'long' type
In file included from debug_allocator.h:5,
                 from stdafx.h:7,
                 from arena.cpp:1:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
gmake: *** [OBJDIR/TrafficProfiler.o] Error 1
gmake: *** [OBJDIR/ani.o] Error 1
In file included from cipher.h:6,
                 from desc.h:7,
                 from OXEvent.cpp:12:
../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type
gmake: *** [OBJDIR/BattleArena.o] Error 1
OXEvent.cpp: In member function 'void COXEventManager::WarpToAudience()':
OXEvent.cpp:375: warning: overflow in implicit constant conversion
OXEvent.cpp:376: warning: overflow in implicit constant conversion
OXEvent.cpp:377: warning: overflow in implicit constant conversion
OXEvent.cpp:378: warning: overflow in implicit constant conversion
OXEvent.cpp:379: warning: overflow in implicit constant conversion
In file included from cipher.h:6,
                 from desc.h:7,
                 from arena.cpp:5:
../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type
gmake: *** [OBJDIR/OXEvent.o] Error 1
arena.cpp: In function 'long int ready_to_start_event(LPEVENT, long int)':
arena.cpp:327: warning: overflow in implicit constant conversion
arena.cpp:328: warning: overflow in implicit constant conversion
gmake: *** [OBJDIR/arena.o] Error 1

Who can help me? :unsure:

 

Regards

 

Nobody?

 

Link to comment
Share on other sites

Thanks, but this is also not working for me. :S

I write it like this: BIND_IP: 85.165.89.161 still the same Error.

Everytime when i restart my host i get a new ip so it is possible to make this to localhost like it is with the database?

Thanks for your help :)

 

I had the same problem, its cause your IP start's with 10.

#endif

		char * netip = inet_ntoa(sai->sin_addr);

		if (!strncmp(netip, "192.168", 7)) // ignore if address is starting with 192
		{
			strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
#ifndef __WIN32__
			fprintf(stderr, "INTERNAL_IP: %s interface %sn", netip, ifap->ifa_name);
#else
			fprintf(stderr, "INTERNAL_IP: %sn", netip);
#endif
		}
		else if (!strncmp(netip, "10.", 3))
		{
			strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));

i changed the "10" to a "99", recompiled, and all works fine

 

To the poster over me, it looks like if you are using a 64 bit system, i had at the beginning similar errors, i considerd 64 bit and now i compile on 32 bit and it works fine, if you want to use more than 4 GB Ram on your server, do it like we did it in the golden times, using 64 bit and put the libs from our 32 bit server under 64 bit in "/usr/lib32"

  • Love 1
Link to comment
Share on other sites

Hello people
Here I try to include Python27 got both from errors and a warning.

5>c:UsersORIGINALEDesktopMT2SourceexternincludePython27/symtable.h(55) : error C2065: 'mod_ty' : undeclared identifier
5>c:UsersORIGINALEDesktopMT2SourceexternincludePython27/symtable.h(55) : error C2059: syntax error : 'const'
5>c:UsersORIGINALEDesktopMT2Sourceexternincludemss.h(1044) : warning C4005: 'AT' : macro redefinition
5>c:UsersORIGINALEDesktopMT2SourceexternincludePython27/token.h(60) : see previous definition of 'AT'

Merci et Good Night All

 

Link to comment
Share on other sites

  • Former Staff

hmm now i want to start developing :)

i want the newest features and i dont want exploits in it...

do you have suggestions which tree i should use for server and for client?

 

and are there differences between the trees?

 

Use novaline client + mainline db and game. Should work fine :)

  • Love 1
Link to comment
Share on other sites

source

cmd.cpp

{ "dice",                do_dice,                0,    POS_DEAD,    GM_PLAYER        },
    { "ÁÖ»çÀ§",                do_dice,                0,    POS_DEAD,    GM_PLAYER        },

=>

    { "dice",                do_dice,                0,    POS_DEAD,    GM_IMPLEMENTOR        },
    { "ÁÖ»çÀ§",                do_dice,                0,    POS_DEAD,    GM_IMPLEMENTORR        },

with this GM_PLAYER everyone could use, to solve simply by GM_IMPLEMENTOR as in the example.

 

sorry bad english but google translator.

 

desc.h

#define HANDSHAKE_RETRY_LIMIT        32

32 = MAX_ALLOW ?

  • Love 1
"Some come to see you fall, others come pick you up
Some come make you smile, others will make you cry
Some lie by lie, lie to deceive others "

 

Link to comment
Share on other sites

  • Premium

If you change the do_war to GM_IMPLEMENTOR then just GMs can do wars, you should check the value in the do_war event.
 
Here is a small and ugly fix:
 
Search for this in cmd_general.cpp:

if (type >= GUILD_WAR_TYPE_MAX_NUM)

Add this over that:

		if (type < 0)
		{
			ch->Disconnect("/war HACKER");
			return;
		}
  • Love 5
Link to comment
Share on other sites

 

If you change the do_war to GM_IMPLEMENTOR then just GMs can do wars, you should check the value in the do_war event.

 

Here is a small and ugly fix:

 

Search for this in cmd_general.cpp:

if (type >= GUILD_WAR_TYPE_MAX_NUM)

Add this over that:

		if (type < 0)
		{
			ch->Disconnect("/war HACKER");
			return;
		}

 

 

  • Love 1
"Some come to see you fall, others come pick you up
Some come make you smile, others will make you cry
Some lie by lie, lie to deceive others "

 

Link to comment
Share on other sites

Help me please

 

Bug Database

#0  0x28404930 in strtoul_l () from /lib/libc.so.7
#1  0x28404b9d in strtoul () from /lib/libc.so.7
#2  0x080ce7ee in mysql_set_character_set ()
#3  0x080d9715 in CAsyncSQL::QueryLocaleSet ()
#4  0x080510e0 in CDBManager::SetLocale (this=0x28821b00,
    szLocale=0x28856b0c "latin1") at DBManager.cpp:172
#5  0x0805d2c5 in CClientManager::InitializeLocalization (this=0xbfbfd35c)
    at ClientManager.cpp:3686
#6  0x0805dfad in CClientManager::Initialize (this=0xbfbfd35c)
    at ClientManager.cpp:95
#7  0x0804feae in Start () at Main.cpp:381
#8  0x080500c5 in main () at Main.cpp:88
 
when I start

Serveur de Production
Log Off
AsyncSQL: connected to localhost (reconnect 1)
Success PLAYER
AsyncSQL: connected to localhost (reconnect 1)
Success ACCOUNT
AsyncSQL: connected to localhost (reconnect 1)
Success COMMON
AsyncSQL: connected to localhost (reconnect 1)
Success HOTBACKUP

it should be like this

Serveur de Production
Log Off
AsyncSQL: connected to localhost (reconnect 1)
Success PLAYER
AsyncSQL: connected to localhost (reconnect 1)
Success ACCOUNT
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
Success COMMON
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
Success HOTBACKUP
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
▒׽▒Ʈ ▒▒▒▒▒▒ ▒▒▒ϴ▒. ▒״▒▒ ▒▒▒▒▒մϴ▒.
▒׽▒Ʈ ▒▒▒▒▒▒ ▒▒▒ϴ▒. ▒״▒▒ ▒▒▒▒▒մϴ▒.
item_proto_test.txt ▒▒▒▒▒ ▒о▒▒▒▒ ▒▒▒߽▒ϴ▒
item_proto_test.txt ▒▒▒▒▒ ▒о▒▒▒▒ ▒▒▒߽▒ϴ▒

 

Link to comment
Share on other sites

  • Premium

Guys the number_ex exploit (dice, etc) is already fixed by YMIR you don't need to fix it again. Those commands are safe to use now.

 

Also, there is no backdoor or whatever besides the usual YMIR stuff (game expire etc), if there was one, we would already know by now.

Link to comment
Share on other sites

Up Help me please :(

 

 

Help me please

 

Bug Database

#0  0x28404930 in strtoul_l () from /lib/libc.so.7
#1  0x28404b9d in strtoul () from /lib/libc.so.7
#2  0x080ce7ee in mysql_set_character_set ()
#3  0x080d9715 in CAsyncSQL::QueryLocaleSet ()
#4  0x080510e0 in CDBManager::SetLocale (this=0x28821b00,
    szLocale=0x28856b0c "latin1") at DBManager.cpp:172
#5  0x0805d2c5 in CClientManager::InitializeLocalization (this=0xbfbfd35c)
    at ClientManager.cpp:3686
#6  0x0805dfad in CClientManager::Initialize (this=0xbfbfd35c)
    at ClientManager.cpp:95
#7  0x0804feae in Start () at Main.cpp:381
#8  0x080500c5 in main () at Main.cpp:88
 
when I start

Serveur de Production
Log Off
AsyncSQL: connected to localhost (reconnect 1)
Success PLAYER
AsyncSQL: connected to localhost (reconnect 1)
Success ACCOUNT
AsyncSQL: connected to localhost (reconnect 1)
Success COMMON
AsyncSQL: connected to localhost (reconnect 1)
Success HOTBACKUP

it should be like this

Serveur de Production
Log Off
AsyncSQL: connected to localhost (reconnect 1)
Success PLAYER
AsyncSQL: connected to localhost (reconnect 1)
Success ACCOUNT
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
Success COMMON
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
Success HOTBACKUP
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
AsyncSQL: connected to localhost (reconnect 1)
▒׽▒Ʈ ▒▒▒▒▒▒ ▒▒▒ϴ▒. ▒״▒▒ ▒▒▒▒▒մϴ▒.
▒׽▒Ʈ ▒▒▒▒▒▒ ▒▒▒ϴ▒. ▒״▒▒ ▒▒▒▒▒մϴ▒.
item_proto_test.txt ▒▒▒▒▒ ▒о▒▒▒▒ ▒▒▒߽▒ϴ▒
item_proto_test.txt ▒▒▒▒▒ ▒о▒▒▒▒ ▒▒▒߽▒ϴ▒

 

 

Link to comment
Share on other sites

I have a small issue that are possible to do on a windows server command -I IP_ADRESSE to a local / Dedicated Server
 
e.g
cd /usr/metin/
   ./game -I 88.68.x.x

in cmd shell .bat?

 

to better understand

http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2794385-release-internal-ip-fix-game-34083-experimental.html

 

 
sorry for the double post my I thought after 48 hours I had the right :)

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.