- 0
Similar Content
-
Activity
-
21
-
2
-
2
edit skill
no not for gm when I choose a skill I will get them p1 i need to edit them from p1 to m1 like this the quest give it to me p1 and i want edit them to m1 -
2
fix Fix Safebox Load Items
You're forgetting Mall: // PythonNetworkStream.cpp // 1. Search: Set(HEADER_GC_MALL_SET, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCItemSet), STATIC_SIZE_PACKET)); // 1. Replace with: Set(HEADER_GC_MALL_SET, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCItemSet2), STATIC_SIZE_PACKET)); -
40
-
2
Automatic Translation of Drop from mob_drop_item.txt and special_item_group.txt Files
I think you need this chardet & codecs -
3
Client.sln errors
I put a Readme.txt in the ClientVS22 folder, you forgot to read it afxres.h is not part of the project, it comes with the C++ MFC. You need to install C++ MFC for latest v143 build tools too when you install your visual studio. If you did not install that then open Microsoft Visal Studio Installer and you can install retrospectively. Check Install.png. A possible dirty workaround if you don't want to install updates is to open ClientVS22\source\UserInterface\UserInterface.rc and modify #include "afxres.h" to #include <Windows.h> -
3
Client.sln errors
Now i have some other problems. Iam using the files from TMP4 40250. Are there some missing files? @ TMP4 can you check this [Hidden Content] -
21
-
-
Recently Browsing
- No registered users viewing this page.
Question
Veysel 0
Hi!
Beforehand, thanks for coming by!
My main issue currently is a nil value. I know, if it's empty, just initialize it or give him some value. But i'm completly lost tbh...
Let me elaborate a little bit:
I have tried to create a copy of the pet system (the old one, not the new). By doing basically a copy of the existed code and changing the names of the same (PetSystem.cpp -> HorseSystem.cpp | class CPetSystem -> class cHorseSystem and etc etc )
I have searched everywhere in the code, where is initialized, where is destroyed, where is used (pet system) and did the same for the copied one.
Everything seemed fine, went well regarding the compilation and the rest. (I was truly happy to test it, like a kid.. just a childish thing tho)
But when trying to call a simple function from LUA, like: horsesystem.is_summon. It just throws an error: Attempt to index a global 'horsesystem' ( Nil value )
Like in the example below:
The line that throws the null pointer:
I have already checked everything ( I think, might be missing something tho ), my AddLuaFunctionTable is complete (with the funcs) and everything else. But still the same exception...
I even did a comparation by adding in a quest:
horsesystem.is_summon(Etc etc)
pet.is_summon(Etc etc)
(The Etc is just an example of a parameter for this scenario)
The pet line returns a value. The horsesystem just throws an exception
My mental war is:
Is the CHorseSystem even initialized ? (I copied everything from the PetSystem, soo.. it should be)
I created as well a new function in AddLuaFunctionTable called test (from LUA side -> horsesystem.test(2022)) and it should be returning just an int like 2022 (not even calling anything from HorseSystem.cpp, just returning automatically from questlua_horsesystem.cpp). But it still gives me an exception.
That's why I'm kinda confused if I need to search more in the LUA side or trying to fix where is in the source.
Already searched everywhere about this issue, most of the topics are just saying to check in questlib and etc. But for what I understood, that's not my case.
Already spent a lot of time by myself, and I don't mind actually, because it is fun (a lot) when you find the cause and you fix it. But in this case.. I'm having a mental breakdown.
Might be an easy thing to fix, but I'm completly destroyed
Thank you in advance!
Any help is precious! Even for discussing. I might get a clue regarding the issue
Kind regards
Edited by Metin2 DevCore X - External 2 Internal
Link to comment
Share on other sites
Top Posters For This Question
5
2
1
Popular Days
Oct 28
6
Oct 29
1
Oct 27
1
Top Posters For This Question
Veysel 5 posts
Speachless 2 posts
PACI 1 post
Popular Days
Oct 28 2022
6 posts
Oct 29 2022
1 post
Oct 27 2022
1 post
Popular Posts
Speachless
In server src you must have a questlua_name.cpp with that name registered, example: CQuestManager::instance().AddLuaFunctionTable("newpet", newpet_functions);
Speachless
Maybe it's because you added that questflag directly to it. Try with something like local mobVnum = ADD_VNUM_HERE if true == horsesystem.is_summon(mobVnum) then and the vnum to be different th
PACI
Make sure you call this function on CQuestManager::InitializeLua() - otherwise it won't register it.
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now