How to write/read from the database?
So I'm working on something that will (or should) help players to customize their character even more, and the whole so called "system" it self is about finished and it works with constant, local and global variables in _Common.
Now, my problem is that I have to change the variables in order for that system to change my character's appearance AND recompile it all again.
What I want to do is, I want a completely new pop up window which will allow me to change these variables using buttons and radio buttons/check boxes but I fear that if I do that it will either change the appearance of all the characters on the server OR only you'll be able to see your changes and nobody else (e.g. like changing textures and models client sided for your self)
And so I'm guessing that I need some sort of clever way to write these variables to the database and fetch them out when necesarry. I've created a new column in CHARACTER_TBL but that's about as far as my SQL and C++ knowledge goes. I've seen pieces of code such as "sprintf( szQuery,"BANK_STR ..." and I'm only guessing I'll need to use one or two of these, but I have no idea what so ever how it works. I'm completely stuck and I've been staring at these for hours and I can't figure them out.
Any help will be very much appreciated.
Re: How to write/read from the database?
Well, as for adding new queries to send/receive information from the database, I don't have much experience with. At most, I've only modified one to accept a couple more parameters. But as for making them show up right in-game, look for the MoverRender function in one of the mover___.cpp (there are several). In that function, you have to check if the mover being rendered is a player, and if it is, check the database for those extra parameters you want to make them show up right.
Re: How to write/read from the database?