[Help]5369 source

08/01/2011 10:39 coreymills#1
i attempted to create a command for the source but its not working could someone help please

Report command:
Code:
case "report":
                                        {
                                            Conquer_Online_Server.Database.Report.addReport(client, "");
                                            break;
                                        }
addReport:
Code:
public static void addReport(Receivers.ClientState client, string text)
        {
            MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
            cmd.Insert("bugs").Insert("Name", client.Entity.Name).Insert("BugReport", text);
        }
any help would be greatly appreciated,
coreymills
08/01/2011 16:25 pro4never#2
Well where exactly does it go wrong?

You're trying to add a blank report in that example so try with some information (you could have the table set to not allow blank fields).

Here's what I use in my source

Code:
var reportString = string.Join(" ", data, 1, data.Length - 1);
            user.CreateBugReport(reportString);
That will pull everything past the initial command (/report or w/e you like) and you can then add it to your database like you are.