Jump to content

Compiled binary crashes after loading screen


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
Share on other sites

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.

Link to comment
Share on other sites

  • Premium

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

Link to comment
Share on other sites

  • Premium

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

Link to comment
Share on other sites

  • 2 months later...
  • 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?

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

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.