Jump to content

Get function from another file


Recommended Posts

I want to change this part of code: Beztytulu_werwhrp.jpg  to check if player got immune_fall - bonus( beacouse it doesnt work, maybe u got better solution to fix that bonus ? )

To do that thing i need to call function from PythonPlayer, but i cannot include header file because i get these errors:

1>d:serwersourcemainline_releaseduserinterfaceAbstractPlayer.h(42): error C2061: syntax error : identifier 'TItemPos'
1>d:serwersourcemainline_releaseduserinterfacePacket.h(608): error C2065: 'CHARACTER_NAME_MAX_LEN' : undeclared identifier
1>d:serwersourcemainline_releaseduserinterfacePacket.h(608): warning C4200: nonstandard extension used : zero-sized array in struct/union
1>          Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
1>d:serwersourcemainline_releaseduserinterfacePacket.h(615): error C2065: 'CHARACTER_NAME_MAX_LEN' : undeclared identifier
1>d:serwersourcemainline_releaseduserinterfacePacket.h(615): warning C4200: nonstandard extension used : zero-sized array in struct/union
1>          Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
1>d:serwersourcemainline_releaseduserinterfacePacket.h(632): error C2146: syntax error : missing ';' before identifier 'pos'
1>d:serwersourcemainline_releaseduserinterfacePacket.h(632): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:serwersourcemainline_releaseduserinterfacePacket.h(1785): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:serwersourcemainline_releaseduserinterfacePacket.h(1787): error C2065: 'ITEM_SOCKET_SLOT_MAX_NUM' : undeclared identifier
1>d:serwersourcemainline_releaseduserinterfacePacket.h(1788): error C2146: syntax error : missing ';' before identifier 'aAttr'

and so on

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

That's because you are mixing libraries.

 

If you try to include PythonPlayer into an Gamelib file, it going to try to include all that's relevant to UserInterface (this has nothing to do with a circular reference). The problem is that even if you do include all the dependencies required for PythonPlayer to work, they are most likely going to conflict (on link time) with the ones on GameLib, because similar data and files are defined in each lib, plus extracting what's relevant from the stdafx.h is not fun either - each lib has their own stdafx and you can obviously not call both.

 

TL;DR: You are not going to be able to do what you are trying to do the way you are trying to do it, and even if you somehow managed, you shouldn't mix the two libraries anyway.

  • Love 1
Link to comment
Share on other sites

That's because you are mixing libraries.

 

If you try to include PythonPlayer into an Gamelib file, it going to try to include all that's relevant to UserInterface (this has nothing to do with a circular reference). The problem is that even if you do include all the dependencies required for PythonPlayer to work, they are most likely going to conflict (on link time) with the ones on GameLib, because similar data and files are defined in each lib, plus extracting what's relevant from the stdafx.h is not fun either - each lib has their own stdafx and you can obviously not call both.

 

TL;DR: You are not going to be able to do what you are trying to do the way you are trying to do it, and even if you somehow managed, you shouldn't mix the two libraries anyway.

Yea thank u, I fixed this another way. :)

Link to comment
Share on other sites

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.