Jump to content

Denny2399

Inactive Member
  • Posts

    119
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Denny2399

  1. Hello, I have a little problem while running the game, can anyone help me?
    This is what've got:

    Spoiler

    5937b9f762713_Vstiek2.PNG.cb84107d901b500273104835c4f67dbf.PNG

     

    singleton.h script file:

    Spoiler

    #ifndef __INC_SINGLETON_H__
    #define __INC_SINGLETON_H__

    #include <assert.h>

    template <typename T> class singleton 

        public: 
            static T * ms_singleton;

            singleton()
            { 
                assert(!ms_singleton);
                long offset = (long) (T*) 1 - (long) (singleton <T>*) (T*) 1; 
                ms_singleton = (T*) ((long) this + offset);
            } 

            virtual ~singleton()
            { 
                assert(ms_singleton);
                ms_singleton = 0; 
            }

            static T & instance()
            {
                assert(ms_singleton);
                return (*ms_singleton);
            }

            static T & Instance()
            {
                assert(ms_singleton);
                return (*ms_singleton);
            }

            static T * instance_ptr()
            {
                return (ms_singleton);
            }
    };

    template <typename T> T * singleton <T>::ms_singleton = NULL;

    #endif
     

     

  2. 12 hours ago, iltizio said:

    It's the wrong way.

     

    It seems you use an applicative user to run the game. Run this:

    chown -R <user> <fileserver dir>

    If it doesn't work, run this:
    chmod -R o+w  <fileserver dir>

    I will try this thanks. I'm trying to run it trought script file and it looks like that this file needs permission, but I have chmod on all the files and nothing seems to work.

  3. Hello guys, I'm a bit struggling with compiling the game, can anyone help me?

    Error:

     

    ibcyfTH.png

    game/src/makefile:

     

    SVN_VERSION = 70140-BETA

    CC = clang++-devel

    INCDIR =
    LIBDIR =
    BINDIR = ..
    ROBJDIR = release
    DOBJDIR = debug
    SRV_DIR = /home/game
    $(shell if [ ! -d lib ]; then mkdir lib; fi)
    $(shell if [ ! -d $(DOBJDIR) ]; then mkdir $(DOBJDIR); fi)
    $(shell if [ ! -d $(ROBJDIR) ]; then mkdir $(ROBJDIR); fi)

    # Standard Setting
    LIBS = -pthread -lm -lmd -llua -llualib
    # Removed -fno-rtti 
    CFLAGS = -Wall -D_THREAD_SAFE -pipe -msse2 -mssse3 -m32 -stdlib=libc++ -std=c++14 -Wno-invalid-source-encoding

    #debug
    CFLAGS_DBG = $(CFLAGS)
    CLINKFLAGS_DBG = $(CFLAGS_DBG)
    CFLAGS_DBG += -g3 -O1 -ggdb -DNDEBUG -fexceptions
    #CLINKFLAGS_DBG += -fstandalone-debug -fsanitize=address

    #release
    CFLAGS_REL = $(CFLAGS)
    CLINKFLAGS_REL = $(CFLAGS_REL)
    CFLAGS_REL += -Ofast -g0 -fexceptions
    #CLINKFLAGS_REL += -flto

    # DevIL
    LIBS += -lIL -ljpeg

    LIBDIR += -L/usr/local/lib/mysql
    LIBS += -lmysqlclient -lz

    # Miscellaneous external libraries
    #INCDIR += -I../../../External/cryptopp
    #LIBDIR += -L../../../External/cryptopp
    LIBS += -lcryptopp -lgtest

    # openssl
    INCDIR += -I/usr/include
    LIBS += -lssl
    LIBS += /usr/lib/libssl.a

    # Project Library
    INCDIR += -I../../../Internal/liblua/include -I../../../Internal
    INCDIR += -I/usr/local/include
    LIBDIR += -L../../../Internal/libthecore/lib -L../../../Internal/libpoly/lib -L../../../Internal/libsql/lib -L../../../Internal/libgame/lib -L../../../Internal/liblua/lib
    LIBDIR += -L/usr/local/lib
    LIBS += -lthecore -lpoly -lsql -lgame -llzo2
    USE_STACKTRACE = 0
    ifeq ($(USE_STACKTRACE), 1)
    LIBS += /usr/local/lib/libexecinfo.a
    endif

    DTARGET  = $(BINDIR)/game_r$(SVN_VERSION)_debug
    RTARGET = $(BINDIR)/game_r$(SVN_VERSION)_release

    CPPFILES := $(wildcard *.cpp)
    OBJ_DBG_FILES := $(addprefix debug/,$(notdir $(CPPFILES:.cpp=.o)))
    OBJ_REL_FILES := $(addprefix release/,$(notdir $(CPPFILES:.cpp=.o)))

    DCPPOBJS    = $(CPPFILE:%.cpp=$(DOBJDIR)/%.o)
    RCPPOBJS    = $(CPPFILE:%.cpp=$(ROBJDIR)/%.o)

    default: $(DTARGET) $(RTARGET)

    debug: $(DTARGET)

    release: $(RTARGET)

    $(DOBJDIR)/%.o: %.cpp
         [MENTION=374979]echo[/MENTION] $(CC) $(CFLAGS_DBG) $(INCDIR) -D__SVN_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@
        @$(CC) $(CFLAGS_DBG) $(INCDIR) -D__SVN_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@
    $(ROBJDIR)/%.o: %.cpp
         [MENTION=374979]echo[/MENTION] $(CC) $(CFLAGS_REL) $(INCDIR) -D__SVN_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@
        @$(CC) $(CFLAGS_REL) $(INCDIR) -D__SVN_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@

    limit_time:
         [MENTION=374979]echo[/MENTION] update limit time
         [MENTION=435108]Python[/MENTION] update_limit_time.py

    $(DTARGET): $(OBJ_DBG_FILES)
         [MENTION=374979]echo[/MENTION] $(CC) $(CLINKFLAGS_DBG) $(LIBDIR) $(LIBS) -o $(DTARGET)
        @$(CC) $(CLINKFLAGS_DBG) $(LIBDIR) $(OBJ_DBG_FILES) $(LIBS) -o $(DTARGET)

    $(RTARGET): $(OBJ_REL_FILES)
         [MENTION=374979]echo[/MENTION] $(CC) $(CLINKFLAGS_REL) $(LIBDIR) $(LIBS) -o $(RTARGET)
        @$(CC) $(CLINKFLAGS_REL) $(LIBDIR) $(OBJ_REL_FILES) $(LIBS) -o $(RTARGET)


    clean:
        @rm -f debug/*
        @rm -f release/*
        @rm -f $(BINDIR)/game_r* $(BINDIR)/conv

    tag:
        ctags *.cpp *.h *.c

    dep:
        makedepend -f Depend $(INCDIR) -I/usr/local/include/c++/v1 -I/usr/include/c++/v1 -prelease/ $(CPPFILE) 2> /dev/null > Depend

    install_dbg: $(DTARGET)
        rm -rf $(SRV_DIR)/share/game
        cp $(DTARGET) $(SRV_DIR)/share/game

    install_rel: $(RTARGET)
        rm -rf $(SRV_DIR)/share/game
        cp $(RTARGET) $(SRV_DIR)/share/game


    sinclude Depend

×
×
  • 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.