[Solved:] Bug in Linux code help please

os12tr

Member
I have been working on setting up my own server for my brothers and I to use. I would like to run the server from a raspberry pi 4. I tried the .DAT version. Everything was working except that the total exp and till next level were not changing. This was on a new character in the first zone at level 1. Not sure if this is effected everywhere.

I then decided to switch over to MySql. I ran into problems with login_server not being able to connect to the database. The account_add works. I used the code from account_add for reading in the MySql data from tethealla.ini and was able to get the servers to work.

I then tried creating a new character and again the exp bug is still present.

I tried the servers .exe for windows listed in the server setup instruction forum in the link above and everything seems to be working with no issues. Characters gain exp and level up.

I did notice the windows ship_server.exe is version 143 and the source code to compile for linux is version 144.

Any thoughts or suggestion as to what is causing the bug?

Both the windows and linux servers were using the same database in the MySql. (Not running at the same time. Just to rule out the database being the issue.)

UPDATE1: I copied every files except .exe from the windows build to the linux folders and used the compiled binaries from this topic. The bug is still there. This leaves me to believe the bug is something in the source code for the ship_server binary. I just have not been able to locate why the purple exp+(some number) text shows on the screen when killing a monster, but the character's total exp and to next level remains the same.

UPDATE2: I added some print lines to see what the data is. I found this line of code to have 0 for l->mapData[mid].exp I have no experience coding in PHP and very little in C++ and java. I am majoring in EE. Any help would be greatly appreciated to figure out why the mapData[mid].exp is reading 0.
Line 8691 in ship_server.c
XP = l->mapData[mid].exp * EXPERIENCE_RATE;

Original source file is from this topic https://www.pioneer2.net/community/threads/linux-tethealla-server.12624/
 
So, do you have a "map" sub folder underneath your ship with all the required map dat files? If yes, since it's Linux, did you set the permissions correctly so that the ship server could read all the map data files under "map"?

I'd imagine that is the problem.
 
Thank you for the reply.

Turns out that the files from the git repositories in the other thread did not have a map folder. I did not copy that folder over from the windows installation.

As soon as I did copy that folder and reloaded the ship_server, my character started gaining the correct exp. So, I guess the files were just missing.

Thanks again for the help. Greatly appreciated.
 
Back
Top