I got WinXP Pro Essential, it came with all the video codecs to view this ;)
As stated before seriously, what hadeset did with INI's sucks. Nobody knows how to optimize INI's far enough to make it work or at least compensate for what MySQL provides other than myself (or at least, I don't know anyone else who can).Quote:
He said he's running his private server off of ini files XD!!!!!!!
Now. What is an ini file?
An initialization file, which is used by an application to store configuration data that is read as the program is starting.
And he plans on basing a whole server off of ini files? XD
Hey on my server, I'm trying to load a timer interval from a .ini file but i keep getting the same error..Quote:
If anyone has any questions at programming feel free to ask; if your going to be stupid and ask something like "how do I make guilds?" I'm not going to bother responding. Please ask something SPECIFIC.
For instance; "How would I implement an IP Ban feature?", "How does ______ work?", etc.
Keep in mind, you question could both be about conquer programming, or general programming, anything thats not currently public won't be released from me (i.e. how do I decrypt password hex dumps? Won't be answered because the knowledge isn't public).
Cannot implicitly convert type 'string' to 'double'
restart.Interval = RestartTime;
Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
RestartTime = server_.ReadValue(Convert.ToString("Server"), "restart");
Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
RestartTime = server_.ReadValue(Convert.ToString("Server"), "restart");
Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini");
RestartTime = Convert.ToDouble(server_.ReadValue(Convert.ToString("Server"), "restart"));
public double ReadDouble(string Section, string Key, double Default)
{
double res;
if (double.TryParse(ReadValue(Section, Key), out res))
return res;
return Default;
}
I get that error twice now, thanks for trying anywayQuote:
Change this :
ToCode:Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini"); RestartTime = server_.ReadValue(Convert.ToString("Server"), "restart");
But isn't the standard timers interval integer, not double?Code:Ini server_ = new Ini(System.Windows.Forms.Application.StartupPath + @"server.ini"); RestartTime = Convert.ToDouble(server_.ReadValue(Convert.ToString("Server"), "restart"));
Also you could try something like...
Code:public double ReadDouble(string Section, string Key, double Default) { double res; if (double.TryParse(ReadValue(Section, Key), out res)) return res; return Default; }