Jump to content

Recommended Posts

Posted (edited)

I'm just exploring the mangosZero source code, I'm experienced with C++ but not with SQL stuff.

Basically I've added a couple of my own tables to the characters database but now when I launch mangosd.exe, it complains that the database doesn't match the expected structure (which makes sense since I modified it), is there something else I need to do code-wise? It looks like I need to edit the db_version table but I'm not sure how to do that to make it happy.

I could spend the time to track it down but there's a heck of a lot of code so if someone knows it would save me a lot of time!

Thanks in advance!

Capture.JPG

Edited by phraggers
screenshot of error
Posted

Hi phraggers,

Your error is actually showing you that you have not updated your database to where it's expected to be. You need to apply some database updates first.

 

When you're looking to integrate your new table into your core, you will use C++ for the communication. 

You can see an example of this when I did something similar: 

https://github.com/mangoszero/server/commit/6483e7de74211b02aa1c716ba4cc063ff86f4265

 

May I ask what your added tables do?

  • Like 1
Posted (edited)

That's incredibly helpful! I was just using the .sql files inside dbZero folder and added my own one there then running InstallDatabases.bat. If I can do this kind of thing through code I'd find it a lot easier. Thanks! I'll have a crack at it and report back.

edit: oh just saw your question at the end. I'm trying to write my own playerbots just for fun and learning. I'm not suggesting creating 2 tables is a good idea but I'm just doing it to learn how since I've never used SQL before. I usually code in C99 and write hash tables and direct file writes for data storage.

Edit2: Just discovered there's a discord server! Probably easier to chat there :)

Edited by phraggers

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

Important Information

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. Privacy Policy Terms of Use