-
Posts
203 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
100%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Amun
-
-
Update:
I just found out the problem is actually from root.
-
1
-
-
Ok, so I'm past that.
I've moved the initialization of modules in a separate function which is called before the python interpreter gets initialized(like the docs said).
Now in UserInterface, Main(), the workflow looks like this:
if (LocaleService_LoadGlobal(hInstance)) SetDefaultCodePage(LocaleService_GetCodePage()); InitializeModules(); Py_Initialize(); CPythonApplication* app = new CPythonApplication; app->Initialize(hInstance);
Before the python app class is instantiated, we load the modules, then initialize the interpreter.
Also, in PythonLauncher.cpp, I'm doing this(for now):
CPythonLauncher::CPythonLauncher() { if (!Py_IsInitialized()) { Py_Initialize(); } }
I should probably remove the initialization from here and just throw an error if it fails to initialize in UserInterface, but it's okay for now.. I have bigger fish to catch.
Now, next problem(which is probably the last one in the source regarding this subject):
In `UserInterface.cpp->RunMainScript()` we're calling
pyLauncher.RunFile("system.py")
Which calls `CPythonLauncher::RunMemoryTextFile`
Which calls `CPythonLauncher::RunLine` with the file data as a string.
The problem is ```PyObject* v = PyRun_String((char*)c_szSrc, Py_file_input, m_poDic, m_poDic);``` always returns NULL instead of running the code.
Yes, the code gets there, I've already checked.
My thoughts are, it might be because of what's going on in RunMemoryTextFile, specifically in:
stConvFileData += "exec(compile('''"; // ConvertPythonTextFormat { for (UINT i = 0; i < uFileSize; ++i) { if (c_pcFileData[i] != 13)// carriage return { stConvFileData += c_pcFileData[i]; } } } stConvFileData += "''', "; stConvFileData += "'"; stConvFileData += c_szFileName; stConvFileData += "', "; stConvFileData += "'exec'))"; stConvFileData += '\0';
The `compile()` function already takes method = 'exec', why do we need to call exec again?(see the first line in the code block before this)
Here's the docs: https://docs.python.org/3/library/functions.html#compile
If I keep it as `exec(compile(''' ` it always returns null when it's executed in RunLine and it throws a shitload of traceback errors.
If I remove the `exec` and just `compile` it with the exec method passed in the function, it doesn't return null anymore, but the code doesn't run, it just returns and jumps straight to exit(0)(in user interface), so I assume the code doesn't get executed.
I'll compile and post the errors in a few minutes.
Any ideas?
Here's the follow up:
With `exec(compile(`:
Spoiler0228 18:18:00158 :: Load system.py
0228 18:18:00316 :: SYSERR: PyRun_String returned NULL. Tracing back...
0228 18:18:02573 :: Traceback:Call: File "<string>", line 1, in <module>
Call: File "system.py", line 1, in <module>
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
Call: File "<frozen importlib._bootstrap_external>", line 877, in exec_module
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "D:\metin2\python3_branch\Client\lib\imp.py", line 1, in <module>
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 1053, in _handle_fromlist
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 1053, in _handle_fromlist
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
Call: File "<frozen importlib._bootstrap_external>", line 877, in exec_module
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "D:\metin2\python3_branch\Client\lib\importlib\util.py", line 1, in <module>
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
Call: File "<frozen importlib._bootstrap_external>", line 877, in exec_module
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "D:\metin2\python3_branch\Client\lib\contextlib.py", line 1, in <module>
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 921, in _find_spec
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
Call: File "<frozen importlib._bootstrap_external>", line 877, in exec_module
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "D:\metin2\python3_branch\Client\lib\tokenize.py", line 1, in <module>
Call: File "D:\metin2\python3_branch\Client\lib\io.py", line 60, in __getattr__
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
Call: File "<frozen importlib._bootstrap_external>", line 877, in exec_module
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "D:\metin2\python3_branch\Client\lib\re.py", line 1, in <module>
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
Call: File "<frozen importlib._bootstrap_external>", line 877, in exec_module
Call: File "<frozen importlib._bootstrap>", line 233, in _call_with_frames_removed
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "<frozen importlib._bootstrap>", line 169, in __enter__
Call: File "<frozen importlib._bootstrap>", line 987, in _find_and_load_unlocked
Call: File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
Call: File "D:\metin2\python3_branch\Client\lib\re.py", line 249, in compile
Call: File "D:\metin2\python3_branch\Client\lib\re.py", line 288, in _compile
Exception: File "D:\metin2\python3_branch\Client\lib\re.py", line 293, in _compile
Call: File "D:\metin2\python3_branch\Client\lib\sre_compile.py", line 759, in compile
Call: File "D:\metin2\python3_branch\Client\lib\sre_parse.py", line 937, in parse
Call: File "D:\metin2\python3_branch\Client\lib\sre_compile.py", line 598, in _code
Call: File "D:\metin2\python3_branch\Client\lib\sre_compile.py", line 71, in _compile
Call: File "D:\metin2\python3_branch\Client\lib\sre_compile.py", line 71, in _compile
Call: File "D:\metin2\python3_branch\Client\lib\re.py", line 249, in compile
Call: File "D:\metin2\python3_branch\Client\lib\re.py", line 288, in _compile
Call: File "D:\metin2\python3_branch\Client\lib\warnings.py", line 96, in _showwarnmsg
Call: File "D:\metin2\python3_branch\Client\lib\warnings.py", line 20, in _showwarnmsg_impl
Call: File "<frozen importlib._bootstrap>", line 1022, in _find_and_load
0228 18:18:02579 :: SYSERR: RunMain Error
0228 18:18:02597 :: SYSERR: CPythonApplication::DestroySo, the code gets executed but can't import anything?
Here's system.py:
Spoilerimport sys import app import dbg sys.path.append("lib") class TraceFile: def write(self, msg): dbg.Trace(msg) class TraceErrorFile: def write(self, msg): dbg.TraceError(msg) dbg.RegisterExceptionString(msg) class LogBoxFile: def __init__(self): self.stderrSave = sys.stderr self.msg = "" def __del__(self): self.restore() def restore(self): sys.stderr = self.stderrSave def write(self, msg): self.msg = self.msg + msg def show(self): dbg.LogBox(self.msg,"Error") sys.stdout = TraceFile() sys.stderr = TraceErrorFile() # # pack file support (must move to system.py, systemrelease.pyc) # import marshal import imp import pack class pack_file_iterator(object): def __init__(self, packfile): self.pack_file = packfile def __next__(self): tmp = self.pack_file.readline() if tmp: return tmp raise StopIteration _chr = __builtins__.chr class pack_file(object): def __init__(self, filename, mode = 'rb'): assert mode in ('r', 'rb') if not pack.Exist(filename): raise IOError('No file or directory') self.data = pack.Get(filename) if mode == 'r': self.data=_chr(10).join(self.data.split(_chr(13)+_chr(10))) def __iter__(self): return pack_file_iterator(self) def read(self, len = None): if not self.data: return '' if len: tmp = self.data[:len] self.data = self.data[len:] return tmp else: tmp = self.data self.data = '' return tmp def readline(self): return self.read(self.data.find(_chr(10))+1) def readlines(self): return [x for x in self] __builtins__.pack_open = pack_open = pack_file _ModuleType = type(sys) old_import = __import__ def _process_result(code, fqname): # did get_code() return an actual module? (rather than a code object) is_module = isinstance(code, _ModuleType) # use the returned module, or create a new one to exec code into if is_module: module = code else: module = imp.new_module(fqname) # insert additional values into the module (before executing the code) #module.__dict__.update(values) # the module is almost ready... make it visible sys.modules[fqname] = module # execute the code within the module's namespace if not is_module: exec(code, module.__dict__) # fetch from sys.modules instead of returning module directly. # also make module's __name__ agree with fqname, in case # the "exec code in module.__dict__" played games on us. module = sys.modules[fqname] module.__name__ = fqname return module module_do = lambda x:None def __pack_import(name,globals=None,locals=None,fromlist=None): if name in sys.modules: return sys.modules[name] filename = name + '.py' if pack.Exist(filename): dbg.Trace('importing from pack %s\\n' % name) newmodule = _process_result(compile(pack_file(filename,'r').read(),filename,'exec'),name) module_do(newmodule) return newmodule #return imp.load_module(name, pack_file(filename,'r'),filename,('.py','r',imp.PY_SOURCE)) else: dbg.Trace('importing from lib %s\\n' % name) return old_import(name,globals,locals,fromlist) def splitext(p): root, ext = '', '' for c in p: if c in ['/']: root, ext = root + ext + c, '' elif c == '.': if ext: root, ext = root + ext, c else: ext = c elif ext: ext = ext + c else: root = root + c return root, ext class PythonExecutioner: def Run(kPESelf, sFileName, kDict): if kPESelf.__IsCompiledFile__(sFileName): kCode=kPESelf.__LoadCompiledFile__(sFileName) else: kCode=kPESelf.__LoadTextFile__(sFileName) exec(kCode, kDict) def __IsCompiledFile__(kPESelf, sFileName): sBase, sExt = splitext(sFileName) sExt=sExt.lower() if sExt==".pyc" or sExt==".pyo": return 1 else: return 0 def __LoadTextFile__(kPESelf, sFileName): sText=pack_open(sFileName,'r').read() return compile(sText, sFileName, "exec") def __LoadCompiledFile__(kPESelf, sFileName): kFile=pack_open(sFileName) if kFile.read(4)!=imp.get_magic(): raise kFile.read(4) kData=kFile.read() return marshal.loads(kData) def execfile(fileName, dict): kPE=PythonExecutioner() kPE.Run(fileName, dict) def exec_add_module_do(mod): global execfile mod.__dict__['execfile'] = execfile import builtins builtins.__import__ = __pack_import module_do = exec_add_module_do def GetExceptionString(excTitle): (excType, excMsg, excTraceBack)=sys.exc_info() excText="" excText+=_chr(10) import traceback traceLineList=traceback.extract_tb(excTraceBack) for traceLine in traceLineList: if traceLine[3]: excText+="%s(line:%d) %s - %s" % (traceLine[0], traceLine[1], traceLine[2], traceLine[3]) else: excText+="%s(line:%d) %s" % (traceLine[0], traceLine[1], traceLine[2]) excText+=_chr(10) excText+=_chr(10) excText+="%s - %s:%s" % (excTitle, excType, excMsg) excText+=_chr(10) return excText def ShowException(excTitle): excText=GetExceptionString(excTitle) dbg.TraceError(excText) app.Abort() return 0 def RunMainScript(name): try: exec(compile(open(name, "rb").read(), name, 'exec'), __main__.__dict__) except RuntimeError as msg: msg = str(msg) import locale if locale.error: msg = locale.error.get(msg, msg) dbg.LogBox(msg) app.Abort() except: msg = GetExceptionString("Run") dbg.LogBox(msg) app.Abort() import debugInfo debugInfo.SetDebugMode(__DEBUG__) loginMark = "-cs" app.__COMMAND_LINE__ = __COMMAND_LINE__ RunMainScript("prototype.py")
-
9 minutes ago, dexolus said:
Okay thanks
I'm not sure, but it might be in cmd_general.cpp, somewhere in one of the ride functions.
Edit: Or in horse_rider.cpp
bool CHorseRider::StartRiding()
-
4 minutes ago, dexolus said:
Can you please tell me where can i find it please?
I just told you to search it in the source(server source).
Use n++ with global search. If you can't find it, it might be because it's in korean, so you have to open locale_string.txt and find the korean string matching this, then search that.
I tried looking for it in my source, but I don't have it, so it has to be something changed in your source.
Good luck
-
Search for that string in the source and remove the check.
-
Just because you didn't get errors compiling it, it doesn't mean you installed it properly.
Look for syserr everywhere(client, client src, server src). If there's nothing there, add logs to everything to see where it breaks.
-
10 hours ago, kenoZ said:
https://metin2.download/picture/kttrjLsZAt95Ldo86WEcpOa54bAVQCE8/.png
can someone tell me why comes this error?
That's part of MFC(Microsoft Foundation Class library). Honestly, you can remove 90%(or more) of what's in UserInterface.rc anyway.
So, you can either:
1. Install MFC
2. Remove what's not used in UserInterface.rc
3. Replace afxres.h with Windows.h
3 hours ago, burakhangunduz66 said:How can we remove the given warning?
I don't think anyone around here can give you any input on that. I've looked a bit around and couldn't find much, only some error reported on Microsoft's docs and this:
https://www.geoffchappell.com/studies/msvc/language/predefined/
You have bigger fish to catch. You're complaining about these info messages because these are the ones you see(typical), but I don't see you saying anything about the hundreds of warnings you get when opening and scanning a cpp file.
TMP4 told you earlier - as long as it's compiling and doesn't interfere with the end result, you're free to solve the actual problems.
Good day
-
1
-
-
compile BattleArena.cpp
gmake: clang++-devel: No such file or directoryHave you installed clang?
-
3 minutes ago, pbugyon said:
oh ok thanks! I misunderstood the explanation, now I understand. I prefer your suggestion. also because I would not know how to create a website shop. but in reality I don't even know how to create a shop in game...
I've added more details, in case you want options.
Edit:
There's lots of websites that are already made, you can just pick one..
Good luck
-
5 hours ago, Marcos17 said:
Don't give the error anymore, but the 7 bonus just fails, it doesn't add at all
Yeah, I wanted to mention previously. That vector(array) of bonuses shouldn't be empty, since there's about 90 of them and it's impossible for all of them to fail the if statement in the previous for loop. If I were you, I would actually add some logs to see why no bonus is passed to the vector.
In short - there's work to be done and I don't have the time to hunt the errors for you, so you'll have to do it yourself, unfortunately. It shouldn't be hard to do, but you never know, maybe there's a big problem.
Cheers!
-
2 hours ago, pbugyon said:
already been inserted previously : CHANNEL: 1
HOSTNAME: first
PORT: 13000
P2P_PORT: 14000
DB_ADDR: 127.0.0.1
DB_PORT: 15000
MAP_ALLOW: 1 4 5 6 3 23 43 112 107 67 68 72 208 302 304
PLAYER_SQL: 127.0.0.1 metin2 password player
COMMON_SQL: 127.0.0.1 metin2 password common
LOG_SQL: 127.0.0.1 metin2 password log
TABLE_POSTFIX:
PASSES_PER_SEC: 25
SAVE_EVENT_SECOND_CYCLE: 180
PING_EVENT_SECOND_CYCLE: 180
VIEW_RANGE: 8000
CHECK_MULTIHACK: 0
ADMINPAGE_PASSWORD: metin2adminpass
ADMINPAGE_IP: 127.0.0.1
SPEEDHACK_LIMIT_COUNT: 300
SPEEDHACK_LIMIT_BONUS: 80
PK_PROTECT_LEVEL: 15
MALL_URL: google.com
TRAFFIC_PROFILE:
TEST_SERVER: 0
MAX_LEVEL: 105
#BIND_IP: Your Private/Internal IPv4 address
#PROXY_IP: Your Public/External IPv4 address
What he means is that the MALL_URL should be changed with the URL of you website's item shop. I'm not quite fond of the current item shop(through an integrated web browser) so, if I were you, I would find some in-game item shop system. But that's just me, you do what you want, obviously.
Cheers!
Edit:
I've looked a bit around. I think the URL is actually coming from cmd.
In game/src/cmd_general.cpp you will find:
snprintf(buf, sizeof(buf), "mall http://%s/ishop?pid=%u&c=%s&sid=%d&sas=%s", g_strWebMallURL.c_str(), ch->GetPlayerID(), country_code, g_server_id, sas);
Where g_strWebMallURL is a constant holding the TLD.
That constant can be found in game/src/config.cpp
string g_strWebMallURL = "www.metin2.de";
Now, you have a few choices:
1.You can replace the TLD with your domain and keep everything else as is, but that would mean that your backend is actually compatible with all the query parameters.
2.You can just get rid of everything in ACMD(do_in_game_mall) and replace it's content with this(don't forget to change the constant with your TLD):
char buf[128]; snprintf(buf, sizeof(buf), "mall http://%s/ishop", g_strWebMallURL.c_str()); ch->ChatPacket(CHAT_TYPE_COMMAND, buf); OR you can remove the constant and write it straight in here: char buf[128]; snprintf(buf, sizeof(buf), "mall http://YOUR_TLD/YOUR_ITEM_SHOP_PAGE"); ch->ChatPacket(CHAT_TYPE_COMMAND, buf);
3. You can remove everything about mall and implement an in-game item shop.
Anyhow.. you'll figure it out
Cheers!
-
1
-
-
You're getting that error because the size of avail is 0.
Something like this should suffice:
Before const TItemAttrTable& r = g_map_itemRare[avail[number(0, avail.size() - 1)]]; Add: if (!avail.size()) { // add some error here about the size, if you want to know when it happens. return false; }
Cheers!
-
4 minutes ago, Debloat said:
Unfortunately, no luck with this... Still crashing without any errors. Same as before, the last thing in the log is
0224 20:38:12373 :: PointWindow: BackGround 0224 20:38:12688 :: 0224 20:38:12689 :: ## Network - Loading Phase ## 0224 20:38:12690 ::
Man, I swear it doesn't make any sense.. Run it in debug again and see if there's any changes in the breakpoints
-
From what I see, VS doesn't complain about it anymore(the warning) when I add the if statement so, maybe the destination is null?
Try it like this:
if (!pbDest || !m_pbCompBufferByLevels[miplevel]) { return false; }
-
-
I'm still here.
I've started rewriting the functions and following the exact docs from:
https://docs.python.org/3/extending/extending.html
I'll keep you posted if anything changes and again.. if anyone has any ideas, please let me know.
-
1
-
-
I don't have time look around and find out if miplevel can be 0(maybe I'll do it later, if it's not fixed), but you could try something like this:
if (!m_pbCompBufferByLevels[miplevel]) { TraceError("No m_pbCompBufferByLevels[miplevel]"); // return false; } memcpy(pbDest, m_pbCompBufferByLevels[miplevel], m_lPitch >> (miplevel * 2));
If that's the last message you see in syserr, just uncomment return false and it should be ok.
Let me know if that works,
Cheers!
-
1
-
-
I see the title is marked as fixed, but I'll leave this here, in case someone else is looking for it.
You're not looking for escaping, you're looking for string concatenation, which can be done with two dots.
ex:
"some string" .. some_var .. "some other string"You can read more here:
-
NULL is basically 0. You can try changing it to:
if (!aItemPoses) { return false; }
It's still checking for falsy, but maybe the warning's going to go away.
Cheers!
-
On 2/17/2022 at 1:31 PM, duwen123 said:
UP!
I may be too late here, but yes. All sources have an .sln which can be opened with Visual Studio.
Here's a pic:
After you open the solution for the first time, visual studio will ask if you want to upgrade the projects. You can choose whatever you want, but I recommend you upgrade them.
If you choose to upgrade, a `Backup` folder will be created with your old files, which you can remove, if you want.
I know you said you don't want to compile them with VS, but here's a topic I made on 22nd, this month(Feb) if you do decide to compile them on windows.
Cheers!
Edit:
If you don't have a .sln file, you can just create a new solution, then create the projects for each folder and just drag and drop the files in visual studio(in each project's source).
If you already have a .vcproj or .vcxproj file but don't have the .sln, you can just create a new solution(project) and then load them by clicking right click on the solution and `add existing project`.
A third option would be to use cmake, but that's more complicated, so I won't get into it.
Spoiler-
1
-
-
14 minutes ago, matyasvane said:
@Amun
Thank you very much, in terms of the listed ones, who would you personally choose to have some working AntiDDOS protection?Honestly, I believe DDoS protection is just a marketing shit. They all need strong infrastructures and bot protections are becoming better and better, so you should be good with any of them. If anyone's flooding your server, they'd have to find a way to bypass all of that.
Yet, if anyone manages to do it, (from my experience)the company won't do shit, because the infrastructure can handle it, so the problem is your server's capacity of handling concurrent requests.
Also.. do people still do that? It's 2022, for fuck's sake :)).
-
1
-
-
11 minutes ago, matyasvane said:
Full answer. Thank you..the problem is that OVH does not offer dedicated servers with less RAM than those mentioned. It offers VPS, but it is not possible to install FreeBSD
I would go with the one that's easiest for you to set up.
There's lots and lots of options, like:
Linode:
https://www.linode.com/docs/guides/install-freebsd-on-linode/
Digital Ocean:
https://www.digitalocean.com/community/tutorials/how-to-get-started-with-freebsd
https://www.digitalocean.com/community/tags/freebsd?language=en
Vultr:
https://www.vultr.com/servers/freebsd/
And these are just a few. There's also Google cloud and AWS, but these are painful to set up and quite expensive.
And all of them give 100-300$ free credit for 3 months(or more) to get started.
However, remember what I said earlier: Always choose the option that's easiest to set up and get started.
Hope it helps, I'm looking forward to seeing your server!
Cheers!
-
I've had a similar problem in the past and it was because of a window that wasn't working properly(Either from some shop system or the inventory, I think). I can't remember exactly what I've done to fix it(because it was years ago), but you could take a look at this:
However, be mindful about it and test it thoroughly.
Edit:
Now that I see the function, yes, I don't really understand why the loop is there, since vector.clear() should reset its size to 0, thus deleting everything(maybe for debugging?).
What I would do is this:
void CWindowManager::__ClearReserveDeleteWindowList() { for (TWindowContainer::iterator itor = m_ReserveDeleteWindowList.begin(); itor != m_ReserveDeleteWindowList.end(); ++itor) { CWindow* pWin = *itor; #ifdef __WINDOW_LEAK_CHECK__ gs_kSet_pkWnd.erase(pWin); #endif if (pWin->GetName()) { TraceError("Attempting to delete %s", pWin->GetName()); } else { auto parentName = pWin->GetParent() ? pWin->GetParent()->GetName() : 0; if (parentName) { TraceError("Attempting to delete unnamed window. Parent: %s, parent name: %s", pWin->GetParent(), parentName); } else { TraceError("Attempting to delete unnamed window. No parent. Any children? %i", pWin->GetChildCount()); } } delete pWin; TraceError("Window deleted."); } m_ReserveDeleteWindowList.clear(); }
And then you'll know exactly if the problem is coming from a window or not, since you'll never see "Window deleted" after the window's(or parent's) name.
Note: I have not tested the code, but it should work fine. Also, you can replace TraceError with Trancefn, if you want to use log.txt instead of syserr.txt
Good luck!
-
1
-
1
-
-
3 hours ago, pbugyon said:
hello, I have a problem, I can not configure the server for Hamachi ip. any advice? I have no experience all this
EDIT : i try sysinstall but command don't exist.
Open the virtual machine and write this in the console
ee /etc/rc.conf
Then delete everything and write this in the file(press ctrl+k to remove line by line, if you want):
hostname=".localhost" keymap="us.kbd" ifconfig_em0="192.168.1.119 netmask 0xffffff00" defaultrouter="192.168.1.1" sshd_enable="YES" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="AUTO" mysql_enable="yes" ifconfig_em0="inet 25.26.45.100 netmask 255.0.0.0" defaultrouter="25.26.45.233"
Replace 25.26.45.233 with your IP from hamachi.
Where it says 25.26.45.100 write your IP from hamachi, but instead of the last 3 numbers, write 100.
To make it simpler, what you need is the ifconfig_em0 and defaultrouter, but I just copy pasted everything from mine..
Press esc, leave editor and save changes.
After that, restart the network interface(write it in the console):
/etc/rc.d/netif restart
If it doesn't refresh automatically, give it a reboot.
Also, make sure your VM's Network configuration is set to Bridged Adapter and name LogMeIn Hamachi.
Here's a couple of pictures:
Something for the other users:
If it takes a while to connect to your VM from SSH or WinSCP, just delete `resolv.conf` from etc.
OR, just edit it and put your IP there. In my case, I would be able to do this:
ee /etc/resolv.conf nameserver 25.26.45.100 Esc, exit and save changes. Then run /etc/rc.d/netif restart You're good to go.
Or delete it:
rm -rf /etc/resolv.conf
Good luck!
Spoiler-
1
-
Edit Server Source on Visual Studio
in Community Support - Questions & Answers
Posted · Edited by Metin2 Dev
Core X - External 2 Internal
That's not the only thing you have to do, mate. I assumed you have at least a basic understanding of VS.
It'll take me a few hours to write it step by step and I will not do that.
However, here's the basics of what you should do, just to get you started:
Create projects for each lib as well(libgame, liblua, libpoly, libsql, libthecore) and link them to the extern.
You should probably create a folder for Common as well(a folder, not a project!).
Add the links for the extern to game as well(in case you didn't), then right click on the project->settings->linker->input and add all the libs to "Additional dependencies"
Here's mine for the debug setup, to save you some time: mysqlclient.lib;ws2_32.lib;DevIL-1.7.8d.lib;DevILU-1.7.8d.lib;DevILUT-1.7.8d.lib;cryptlib.lib;libpoly_d.lib;libgame_d.lib;libthecore_d.lib;liblua_d.lib;%(AdditionalDependencies)
Don't forget to add the links to where these libraries are in VS++ Directories-> External Include Directories and Library directories OR in Linker->General->Additional Library Directories !!!!
These are just the things I remembered you have to do, but there's probably way more.
I would've started with DB if I were you,. Game takes a while to compile and you'll rip you hair out if it fails 100 times.
One other alternative would be to download some server files that are already set up and replace the files with yours. You can take a look at what I posted a few days ago if you want:
Maybe I'll create a full tutorial on the forum at some point, but I'm too busy this week, so that's not going to happen very soon.