Jump to content

Recommended Posts

hello dear metin2dev,

 

I'm currently working on compiling the metin2 binary.

 

Well. Maybe it's too damn easy for me to find the solution but everytime I compile the metin2client.exe (mainline_released) it'll crash right after finishing the loading process.

 

It doesn't matter if I start it with older or newer granny. I also replaced the python-library but it seems like it doesn't have any effect.

 

The following error occurs in syserr.txt:

 

 

0515 13:07:16391 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR
0515 13:07:26775 :: ui:3091: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

0515 13:07:26777 ::
uiCharacter.py(line:399) __LoadWindow
uiCharacter.py(line:152) __LoadScript
ui.py(line:2818) LoadScriptFile
ui.py(line:3008) LoadChildren
ui.py(line:3008) LoadChildren
ui.py(line:3008) LoadChildren
ui.py(line:2864) LoadChildren
ui.py(line:3091) LoadElementButton

CharacterWindow.__LoadWindow - <type 'exceptions.OverflowError'>:Python int too large to convert to C long

0515 13:07:26777 :: ============================================================================================================
0515 13:07:26777 :: Abort!!!!
 

 

I hope someone can help me. In the whole source-directory there's no tp_compare function (not in the client and also not in the binary source). I've found it only the python includes.

 

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
https://metin2.dev/topic/1237-compiled-binary-crashes-after-loading-screen/
Share on other sites

  • Former Staff

You should use the novaline binary. All people i know who used mainline released changed to novaline afterwards. It just works way better

Even if the error is not binary specific i would prefer to change

It is binary specific. With other binaries I can start, but when I compile my own it won't.

 

Also I've now tried to compile novaline and it did work though the same error persists. I've also upgraded to python 2.7 but still nothing changed.

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

  • Honorable Member

You encounter this error because you don't use CTOA, so, the client will not be able to convert integer numbers to C long, goint into an error.

 

 

Solution:

 

Add this to system.py:

def StringColorToInt(colorstring):
    import grp
 
    colorstring = colorstring.strip()
 
    if len(colorstring) != 8:
        raise ValueError, "input #%s is not in #AARRGGBB format" % colorstring
 
    a, r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:6],colorstring[6:8]
    a, r, g, b = [int(n, 16) for n in (a, r, g, ]
 
    return grp.GenerateColor(float® / 255.0, float(g) / 255.0, float( / 255.0, float(a) / 255.0)
 
__builtin__.CTOA = StringColorToInt
 
Search for 0xff codes in the client root/locale/uiscript and change them like this:
 

0xffFFB96D = CTOA("ffFFB96D")

 

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

I tried that.

 

Now I've got a new error:

networkModule.SetSelectCharacterPhase - <type 'exceptions.NameError'>:name 'CTOA' is not defined

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

  • Honorable Member

Add also in system.py this one:

__builtin__.CTOA = StringColorToInt

and it should be ok

Look closely, it's in my code, anyway vanilla, you forgot this part.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

  • 2 months later...
  • Premium

PythonUtils.cpp

// Python int too large to convert to C long#define PyLong_AsLong PyLong_AsLongLong#define PyLong_AsUnsignedLong PyLong_AsUnsignedLongLong
um. That's OK but when we work on large numbers we can have badly suprises
  • 7 months later...

 

You encounter this error because you don't use CTOA, so, the client will not be able to convert integer numbers to C long, goint into an error.

 

 

Solution:

 

Add this to system.py:

def StringColorToInt(colorstring):
    import grp
 
    colorstring = colorstring.strip()
 
    if len(colorstring) != 8:
        raise ValueError, "input #%s is not in #AARRGGBB format" % colorstring
 
    a, r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:6],colorstring[6:8]
    a, r, g, b = [int(n, 16) for n in (a, r, g, ]
 
    return grp.GenerateColor(float® / 255.0, float(g) / 255.0, float( / 255.0, float(a) / 255.0)
 
__builtin__.CTOA = StringColorToInt
 
Search for 0xff codes in the client root/locale/uiscript and change them like this:
 

0xffFFB96D = CTOA("ffFFB96D")

 

 

Put it in all files?

In all 400 lines?

  • 1 month later...

now debug client say:

the eterpack doesn't exist[pack/]

 

##Network - Offline phase ##

##Network - Offline phase ##

 

And in syserr (runtime error) 

.....

i ve changed all 0xff in CTOA("ff...")

 

wtf............

  • 3 weeks later...

update *1

no load my player ............

 

 
0502 22:44:21340 :: CPythonNonPlayer::LoadNonPlayerData: invalid size 338895 check data format.
0502 22:44:21340 :: LoadLocaleData - LoadMobProto(locale/es/mob_proto) Error
 
 
 
 

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.