Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

#ifdef not recognizing defined var

Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
Alright so i'm actually a java developer so i'm pretty new to this. But this is just a very weird issue which I can't explain...

I'm following a very simple guide to add a new stated pet with a new bonus, speed in this case. I have a certain part in the code which is checking if a certain definition is present:

define.h (resource)
Code:
#ifdef __NEWRAISEDPETSPEED
        #define PK_XAKZI    7
        #define    PK_MAX        8   
#else
        #define PK_MAX    7
#endif



As you can see, the line "#define PK_MAX 7" lights up so it means that the editor thinks, that __NEWRAISEDPETSPEED is not defined. While when I CTRL+click it, it brings me right to the definition...
kCommon.h


Can anyone explain me why my editor does not recognize that __NEWRAISEDPETSPEED def?

When I put the __NEWRAISEDPETSPEED def right above it, it works fine...
 
Junior Spellweaver
Joined
Sep 29, 2021
Messages
133
Reaction score
26
Alright so i'm actually a java developer so i'm pretty new to this. But this is just a very weird issue which I can't explain...

I'm following a very simple guide to add a new stated pet with a new bonus, speed in this case. I have a certain part in the code which is checking if a certain definition is present:

define.h (resource)
Code:
#ifdef __NEWRAISEDPETSPEED
        #define PK_XAKZI    7
        #define    PK_MAX        8   
#else
        #define PK_MAX    7
#endif



As you can see, the line "#define PK_MAX 7" lights up so it means that the editor thinks, that __NEWRAISEDPETSPEED is not defined. While when I CTRL+click it, it brings me right to the definition...
kCommon.h


Can anyone explain me why my editor does not recognize that __NEWRAISEDPETSPEED def?

When I put the __NEWRAISEDPETSPEED def right above it, it works fine...

At the top left if im not wrong, change it to Neuz if there is Accountserver, Cacheserver or etc. in define.h
 
Upvote 0
Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
At the top left if im not wrong, change it to Neuz if there is Accountserver, Cacheserver or etc. in define.h

You were right, but even after changing this, i'm still getting the same error when I start the world server.

Code:
2023/ 2/ 6   19:26:46   FileName transformitem.inc(45) : PK_XAKZI Not Found. : PK_XAKZI	1	0	0

I even removed the #ifdef definitions and just put it plain in there. Like define.h:
Code:
#define	PK_NPC		-1
#define	PK_TIGER		0
#define	PK_LION		1
#define	PK_RABBIT		2
#define	PK_FOX			3
#define	PK_DRAGON	4
#define	PK_GRIFFIN	5
#define	PK_UNICORN	6
#define PK_XAKZI	7
#define	PK_MAX		8

Any idea's? You're welcome to take a look trough anydesk or discord if you want.
 
Upvote 0
Inactive
Joined
Jan 20, 2009
Messages
1,015
Reaction score
1,830
You were right, but even after changing this, i'm still getting the same error when I start the world server.

Code:
2023/ 2/ 6   19:26:46   FileName transformitem.inc(45) : PK_XAKZI Not Found. : PK_XAKZI	1	0	0

I even removed the #ifdef definitions and just put it plain in there. Like define.h:
Code:
#define	PK_NPC		-1
#define	PK_TIGER		0
#define	PK_LION		1
#define	PK_RABBIT		2
#define	PK_FOX			3
#define	PK_DRAGON	4
#define	PK_GRIFFIN	5
#define	PK_UNICORN	6
#define PK_XAKZI	7
#define	PK_MAX		8

Any idea's? You're welcome to take a look trough anydesk or discord if you want.

Define PK_XAKZI in define.h via your Source/Resource only.
Define __NEWRAISEDPETSPEED in kCommon.h only.

Compile & then copy define.h to your Server/Resource, make new res files using merge.
 
Upvote 0
Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
Define PK_XAKZI in define.h via your Source/Resource only.
Define __NEWRAISEDPETSPEED in kCommon.h only.

Compile & then copy define.h to your Server/Resource, make new res files using merge.

Yep u were right. Working fine now.
The only thing wrong atm, is that the pet shows ingame whn i spawn it, but it shows invisible in the inventory. What would that be related to?
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
Edit the inventory icon in spec_item.txt for said item.
Yup fixed :p

When I start up the World, it auto closes, there is no error at all. Anywhere else I could look for an error? Or how would you handle that?
 
Upvote 0
Newbie Spellweaver
Joined
Feb 4, 2023
Messages
19
Reaction score
1
Debug worldserver.exe its #7 in the setup guide.

Ye so in the end I found out that, I probably changed something in the source and forgot to compile. Got it all working now.

I'm currently trying to figure out why the client is crashing tho. Got no more server errors, but client crashes when i spawn the pet. Giving following errors:

Code:
2023/ 2/ 8   10:02:12   GetModelElem - out of range: type=5, size=1530, index=758
2023/ 2/ 8   10:02:12   CModelMng::loadModel mdlObj/mdlDyna 에 objtype=5 index=758 bpart=0 의 정보가 없군여.
2023/ 2/ 8   10:02:12   CreateObj : type=5, index=758, bInitProp=1


update: Found out the issue. Apparently I've placed something in mdlDyna.inc at a wrong location. Everything is working smooth now!
 
Last edited:
Upvote 0
Back
Top