So i have this space client/server game that uses sql database to store data (loginname, password, etc, etc). The database creation happens in SQL Server Management Studio 2005, then i have to make a empty database and execute sql query to make the database match the server.
The database is working fine unless you attack (engage) and then cancel the attack (disengage) a bot (AI) in the game. Then it wont save data to the database (e.g when create new character, log off the game and then try to logon, it says different password - data wasn't saved to the database).
After hours of researching i found the exact code that cause the bug:
DatabasePlayerAdapter.set_UserEngageCheck(check, BotMemory.BotNameToCheck(Victom));
So i assume it happens in the .set_UserEngageCheck, which is located in the DatabasePlayerAdaptes.cs file in the project. Here's the code:
public static int get_UserEngageCheck(int i)
{
return get_Player(i).EngageCheck;
}
Any ideas how do i fix this ? Thanks!
What I have tried:
Nothing really. Just found out where the bug actually occurs. I am pretty new to C# so i don't really know how to fix.