• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Server not saving

Some1

New Member
Joined
Jan 12, 2013
Messages
40
Reaction score
4
Tried this by using Dev-C++ 4.9.9.2
The server is 0.2.14 Mystic Spirit (9.60)
When opening TheForgottenServer.dev it gives me an error saying that a file is not found but it doesn't say what file is missing. After trying to compile it, at the end when it says linking bla bla.. it fails and opens combat.cpp file and doesn't create the .exe.
Tried with TheForgottenServer-console.dev and at the end same file opens but it creates the .exe file.
This is what shows up from the combat.cpp
Code:
        double angleRad = 3.1416 * angle / 180.0;

        double a = std::cos(angleRad);
        double b = -std::sin(angleRad);
        double c = std::sin(angleRad);
        double d = std::cos(angleRad);

        for(int32_t x = 0; x < (long)input->getCols(); ++x)
        {
            for(int32_t y = 0; y < (long)input->getRows(); ++y)
            {
                //calculate new coordinates using rotation center
                int32_t newX = x - centerX;
                int32_t newY = y - centerY;

                //perform rotation
                int32_t rotatedX = round(newX * a + newY * b);
                int32_t rotatedY = round(newX * c + newY * d);

                //write in the output matrix using rotated coordinates
                (*output)[rotatedY + rotateCenterY][rotatedX + rotateCenterX] = (*input)[y][x];
            }
        }
        output->setCenter(rotateCenterY, rotateCenterX);
    }
}

MatrixArea* AreaCombat::createArea(const std::list<uint32_t>& list, uint32_t rows)
{

Now, by using the console version, logging off doesn't save the character and neither it saves when using !save command
I tried the database with an already compiled .exe and it works fine so it has to be in the source.
30syddi.jpg
 
Those are the first lines that appear in the file after it fails to compile:
Code:
                int32_t rotatedX = round(newX * a + newY * b);
                int32_t rotatedY = round(newX * c + newY * d);
It isn't highlighted and neither it has a star next to it.
The gui version doesn't even get created after compilation, and the console got that error that I posted in the first post, it doesn't save anything.
 
I know that there is an already compiled version, I've checked that too. The thing is that I'm using my own sprites, items, monsters etc., and to add new effects I need to make a source edit which I can't because something is wrong with the files or maybe with the compiler itself.
 
Now it's opening game.cpp and this line is marked:
Code:
    uint64_t fee = (price / 100.) * amount;
However, the main issue is still there, the server doesn't save, neither it saves anything on !save command nor it saves anything when you logout.
5eh82o.jpg
 
No error while compiling, but the error is still there. Looks like the bugs so far have nothing to do with what's wrong.
You can't save anything. I don't know if you tried, but once the player logouts, nothing is saved, it's back at temple. You can't even save the server by command or anything. It keeps reseting.
 
Im still new to this.
Just curious why your so adamant about using this distro?
Most new distros don't support XP (yeah I know it's shit), neither I'd like anything under 8.7 because of the cooldown system which I will need because of some custom spells. So I found 0.2.14 just having that save error bug, other have some errors for which I don't know what it either means or what should I change. Somehow managed to fix 1 error and another one pops up. Another option is 0.2.10 (8.7 :x)
They're both 0.2 and I came 'down' from 0.3.6 and kinda stuck with fixing whats wrong or missing.
Also why the need to use sqlite?
I know but not really planning on using this as live server for a long time. Neither it's finished nor I have that much knowledge to continue this server alone. Will switching to mysql 'fix' the not saving bug?
One more thing if you intend on customizing this server, how can you do that with no knowledge of c++?
I don't really know much about c++ but right now I need that so I can add new effects, anyway I have to start from somewhere. I still suck at lua and c++, trying to learn but I lack time for that, so I started from what I actually like doing, adding custom sprites and mapping.
 
Back
Top