However, we recently received a bug report from a player from Russia that they can't launch the game. The problem seems to be that CTypes can't load the .dll when there are Cyrillic characters in the file path. On my own PC I haven't been able to recreate the exact same issue (they get a traceback with the error "WindowsError: exception: access violation reading 0x00000000" on the line of the first function call from the .dll while I just get a pop-up that it couldn't open the file at the file path, with all Cyrillic characters replaced with question marks) but at least I could confirm that the game doesn't launch if it's installed in a directory with non-English characters.
I have tried various ways to make sure that the variable for the file path that is used to load the .dll is in Unicode, but I still haven't been able to make it work so far.
Here is the code that is used to load the library:
Code: Select all
init python:
import ctypes
import os
path = os.path.abspath(os.path.join(config.basedir, "game\kartridge\kartridge-sdk-x86.dll"))
_kartridge = ctypes.CDLL(path)
After this, _kartridge is used whenever the game needs to call a function related to the Badges, but because it works fine as long as the file path uses English characters, the issue probably lies in the code above.
At this point I'm not sure if there's a problem with what I'm doing or if this is a CTypes issue, so any help would be appreciated!