• 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!

Add database Step4, not working

Thogora

New Member
Joined
Apr 28, 2020
Messages
9
Reaction score
0
Hello guys.

My knowledge of programing/myphp/sql and such are really limited and I have not done anything like this before so I apologize in advance for any misunderstanding on the way that will occur.
I have been working on creating my own Tibia server for some time now and found several guides yet non of them that works as they the guide says it does. However, there is one guide that almost works, [Tutorial] How to setup The Forgotten Server TFS 1.2 (10.98) (https://otland.net/threads/tutorial-how-to-setup-the-forgotten-server-tfs-1-2-10-98.264061/) . Instead of using xampp that starts with errors (utterly shit?) i used Uniform Server and it works quite good until i get to "Step 4" (adding databases). At this point I get stuck, it just says "Add samples to DB: " and nothing happens. The guy in the video gets his database added in an instant. So my question is: How do I solve this?
 
Thank you for your reply Ralumbi.

I have tried that guide and it does not work for me. Following this guide I get several errors on the way that are not mentioned within the guide, however I did try it once more because you mentioned it so I could write down the problems I have and hopefully get it to work. At the following steps I get errors.

Firstly: When starting UniServ it gets the error stating that “VCRUNTIME140_1.dll” is missing. Googled it and found it on GitHub, now the UniServ starts. Why the heck does the guide not mention this?

Second: Problem I get is when I have added the database to myphpadmin, adding as a new database and adding file “scheme.sql” as the guide says, I get this “Warning: #1681 Integer display width is deprecated and will be removed in a future release.” After some googling I found out that I should not worry about. Eh, why?

Third: Adding the said DLL pack to my TFS 1.2. In this dll pack there are a file “libmysql.dll” as well the TFS1.2 have one as well. The TFS 1.2 “libmysql.dll” are 4.95 MB and the one from the DLL pack are 2.58 MB. Have tried them both and there are as far as I noticed no difference. Which one do I use?

Forth: upon running “Theforgottenserver.exe” I get the error that “VCRUNTIME140_1.dll” is missing, so adding it and now the server runs. Again, why does the guide not mention this?

So after all this problem that IS not mentioned in the guide I can get the UniServer to run and theforgotenserver.exe. And now the real difficulty starts. The guide says “$config['ServerEngine'] with the correct TFS version you are running (TFS_02, TFS_03 or TFS_10).” This might just be me that lacks knowledge, but which am I running? I use the TFS 1.2. By default, the “Config.php” is set to TFS_10. Is this correct for TFS1.2? How do I interpret it?

Finally: I can access the website using 127.0.0.1. On the site I can create an account (can see it in myphpadmin) but I cannot login to it, also on the site I get this message:

“No changelogs submitted.string(165) "SELECT n.id, n.title, n.text, n.date, p.name FROM znote_news AS n INNER JOIN players AS p ON n.pid = p.id ORDER BY n.id DESC;"

(query - SQL error)

Type: select_multi (select multiple rows from database)



Table 'tibia111.znote_news' doesn't exist”

The “tibia111” is what I call my database in myphpadmin.



I have no idea what this means, tried googling but I cannot find any answer to it that works for me.

I would appreciate any help.



Kind regards.

Thogora



(Maybe this should be posted as a separate thread)
 
You have learned a lot!!! Great to hear! Remember it is a Guide, not a full here you go grab and run your server package. Guides are to push you in the right direction. Beside that you are 95% done :)
Inside your znoteaac website package you will find the folder engine/database here you will find znote_schema.sql add this schema to your existing database table inside phpmyadmin and you are all set!!!!

Good luck!

ps; its still somewhat the same issue so this thread is fine.
 
Thank you Ralumbi, you are very kind :)
I found the file Znote_scheme.sql at the location you said and got this code from lin 165.

Lua:
CREATE TABLE IF NOT EXISTS `znote_forum_threads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `forum_id` int(11) NOT NULL,
  `player_id` int(11) NOT NULL,
  `player_name` varchar(50) NOT NULL,
  `title` varchar(50) NOT NULL,
  `text` text NOT NULL,
  `created` int(11) NOT NULL,
  `updated` int(11) NOT NULL,
  `sticky` tinyint(4) NOT NULL,
  `hidden` tinyint(4) NOT NULL,
  `closed` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

I understand parts of it however how I implement any of this "SELECT n.id, n.title, n.text, n.date, p.name FROM znote_news AS n INNER JOIN players AS p ON n.pid = p.id ORDER BY n.id DESC;" I really do not know. How I beleave it shuld be is as this exmple "n.id" were "n" in matematics are any real number but I fail to see how and were to implement a number. Could it be that I just in the code id enter 1.id or just 1?

Have not looked in too this all to much yet, will keep working when I get home later today.

Kind regards
Thogora
 
When you open your phpmyadmin and click on the database (left side panel)
You will find a button called SQL in the top menu, you can copy and paste everything from that file into the SQL form here.

Sincerely,
Ralumbi
 
Back
Top