Jump to content
metin2dev
Ekstasia2
Vanilla

[SRC] Vanilla Core [latest: r71480]

Recommended Posts

What makes this mistake happen? If I undefine it (min,max,MIN,MAX), it works. But I would like to know what the problem is.

dfgfdg.png

Share this post


Link to post
Share on other sites

Someone reported to me that this error could happend:

"use of undeclared identifier 'it'"

"use of undeclared identifier 'typeof'"

 

Open libthecore/StdAFx.h

Find:

#define __typeof typeof

and replace with:

#if __cplusplus <= 199711L
//C++99 Compatibility code
#define __typeof typeof
#endif

 

Why? '__typeof' is not defined on C++99, so this code works for them but, if you use GCC >5 or CLang you use C++11, and in C++11 'typeof' became '__typeof' so this macro is non-sense of them

9 hours ago, MT2Virus said:

What makes this mistake happen? If I undefine it (min,max,MIN,MAX), it works. But I would like to know what the problem is.

dfgfdg.png

Freebsd sys library define MIN and MAX.

Change all class MIN,MAX into _MIN and _MAX

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks, for me worked!!!

/game/src/StdAFx.h

#if __cplusplus <= 199711L
//C++99 Compatibility code
#define __typeof typeof
#endif

 

Edit2: if anyone have this problem: 

undefined reference to boost::system::system_category()

add into makefile, at end of CFLAGS, this: -lboost_system

Share this post


Link to post
Share on other sites

Any updates?

There is a core down in the uniqueKill Funktion which is called in char_battle.cpp.

The down appears on very heavy loads with many plaeyrs.

 

Greets

Share this post


Link to post
Share on other sites
item.cpp:1962:12: error: use of undeclared identifier 'VOID'; did you mean 'VOID2'?
        SetWindow(VOID);
                  ^~~~
                  VOID2
./../../common/length.h:476:2: note: 'VOID2' declared here
        VOID2
        ^
1 error generated.
gmake: *** [Makefile:77: debug/item.o] Error 1
gmake: *** Waiting for unfinished jobs....

i'm using clang etc. and i have to ask, change VOID to VOID2 is good option? Finally it's compiled, but im not sure :v

Share this post


Link to post
Share on other sites

Hey everyone, sorry for the lack of updates. Real life and stuff. Anyway, I'm preparing a bigger update. Lots of code cleaning and error fixing. I read what you wrote and will try to fix what you reported. Thanks to you all for reporting bugs and suggest changes.

Though I will start upgrading the code to c++17 standard which means that I'll most likely not make changes to macro definitions like mentioned above. People should build the project like it's meant to be and under the same feature sets and compilers like I did, to make sure there's less room for errors. If you want to port the code, you can do so of course, I don't mind that. But for 'official' release they won't be included.

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

scrap what i said earlier , when we get new links ?

Edited by tareeestima
got informed the last days and put myself up to date with everything about server files. still learning though, making up for 10 years absence in this game.

Share this post


Link to post
Share on other sites

Thank's for Your work, Vanilla! 

I think it would be useful to create a small guide on how to configure a virtual machine that can compile your files without errors.
This would allow more people to test the file :D

Share this post


Link to post
Share on other sites
11 hours ago, Hik said:

Thank's for Your work, Vanilla! 

I think it would be useful to create a small guide on how to configure a virtual machine that can compile your files without errors.
This would allow more people to test the file :D

He already did it:

Share this post


Link to post
Share on other sites

Something more detailed and with the necessary commands would certainly be more useful, do not you think so?

Share this post


Link to post
Share on other sites

I have problem cuz i compile source without any problem, but ingame when i logout (yes, logout) 3/4 times my game core is crashed, someone maybe knows why?
syserr is clear

Share this post


Link to post
Share on other sites

No need to re-upload. Next version is already distributed to a few people for testing. If everything works it will be released :) Just waiting for feedback. If someone wants to test it, feel free to drop me a message.

  • Like 3

Share this post


Link to post
Share on other sites
On 6/4/2018 at 10:10 PM, Vanilla said:

No need to re-upload. Next version is already distributed to a few people for testing. If everything works it will be released :) Just waiting for feedback. If someone wants to test it, feel free to drop me a message.

Dont forget windows sf src client friend please :)

Share this post


Link to post
Share on other sites
En 4/6/2018 a las 21:10, Vanilla dijo:

No need to re-upload. Next version is already distributed to a few people for testing. If everything works it will be released :) Just waiting for feedback. If someone wants to test it, feel free to drop me a message.

 

Message sent

Share this post


Link to post
Share on other sites
vor 16 Minuten schrieb krokogames:

Hello how to fix this error

 

KP1nt7G.png?1

you need to build liblua which is located at the 'Internal' directory of the source.

  • Thanks 1

Share this post


Link to post
Share on other sites
12 hours ago, Vanilla said:

you need to build liblua which is located at the 'Internal' directory of the source.

thanks but i have new error 

can i replace code:  

  template <typename T> T MIN(T a, T b)
    {
        return a < b ? a : b;
    }

    template <typename T> T MAX(T a, T b)
    {
        return a > b ? a : b;
    }

    template <typename T> T MINMAX(T min, T value, T max)
    {
        T tv;

        tv = (min > value ? min : value);
        return (max < tv) ? max : tv;
    }

to:  

 template <typename T> T _MIN(T a, T b)
    {
        return a < b ? a : b;
    }

    template <typename T> T _MAX(T a, T b)
    {
        return a > b ? a : b;
    }

    template <typename T> T _MINMAX(T min, T value, T max)
    {
        T tv;

        tv = (min > value ? min : value);
        return (max < tv) ? max : tv;
    }

 

 

4hEp.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×