![]() |
|
[C#] Restart Problem - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: [C#] Restart Problem (/showthread.php?tid=779) |
- Nikolee - 05-02-2012 No i think there isnt a start Parameter only Double Click on the GS and it starts^^ - Nikolee - 05-03-2012 For the Cash Server it also not work it start it and crash - someone - 05-03-2012 For the Games server to start you must set the working directory(the directory where the gameserver is located, or the directory where the gameserver loads files). - HateMe - 05-04-2012 oh ok then you need to make it like this nikola bool CheckGS; CheckGS = CheckIfAProcessIsRunning("Gameserver"); if (CheckGS == false) { Process MyProcess = new Process(); MyProcess.StartInfo.FileName = "Server\\GameServer\\Gameserver.exe"; MyProcess.StartInfo.WorkingDirectory = "Server\\GameServer\\"; MyProcess.Start(); } - Nikolee - 05-05-2012 One problm with this code : Process MyProcess = new Process(); MyProcess.StartInfo.FileName = "Server\\GameServer\\Gameserver.exe"; MyProcess.StartInfo.WorkingDirectory = "Server\\GameServer\\"; MyProcess.Start(); It cant find the GameServer^^ i tried to set workingDir to this "Server\\GameServer\\Gameserver.exe" and then it started the gs but it not loading the stuff^^ With this Start the GS but again Loading errors: Process MyProcess = new Process(); MyProcess.StartInfo.FileName = "Server\\GameServer\\Gameserver.exe"; MyProcess.StartInfo.WorkingDirectory = "Restart\\Server\\GameServer\\Data\\"; MyProcess.Start(); [/Code] - someone - 05-05-2012 Process MyProcess = new Process(); MyProcess.StartInfo.FileName = "Gameserver.exe"; MyProcess.StartInfo.WorkingDirectory = "Server\\GameServer\\"; MyProcess.Start(); Did you try this, since the relative path would start from the working directory(not the directory where the tool is in). - HateMe - 05-05-2012 try to use the full path on it. Process MyProcess = new Process(); MyProcess.StartInfo.FileName = @"c:\\Server\\GameServer\\Gameserver.exe"; MyProcess.StartInfo.WorkingDirectory = @"c:\\Server\\GameServer\\"; MyProcess.Start(); and it can be that u may need to add MyProcess.LoginName = "yourPCuserName"; MyProcess.Password = "yourPCuserNamePassword"; not sure about this but u may find something about it in google - Nikolee - 05-05-2012 Process MyProcess = new Process(); MyProcess.StartInfo.FileName = "Gameserver.exe"; MyProcess.StartInfo.WorkingDirectory = "Server\\GameServer\\"; MyProcess.Start(); Did you try this, since the relative path would start from the working directory(not the directory where the tool is in). Yeah this is it ty guys. @ HatMe i cant make i with C: because not everyone use C ^^ - HateMe - 05-05-2012 i know it was jsut an example - Nikolee - 05-05-2012 A simple question : I make atm a Feature to Bann Player with C# and MySql but i got one Problem. I need to Read out with the player name the a_index. Also : From a_name to know the a_index. With this is not Working : UPDATE `newproject_db`.`t_characters` SET `a_enable` = 0 WHERE `t_characters`.`a_Name` =Tast; // Thats for Bann with Name And i started with this : string PlayerId = maskedTextBox1.Text; string Index = "SELECT * FROM `t_characters` a_index WHERE `a_name` = Niko "; // And how can i Include the string PlayerID ? But it Always say Unkown Column -.- I dont know what more i should do tryied so much things . 2 Only wanna to bann the Player with the Name not with Index..^^ GN8 hope tommorow i got some answers^^ |