Dwight
Member
|
Server Should save last information
Code:
void Shut()
{
File file;
file.write("C:/Esenthel MMO/Storage/Info/Information.txt");
file.putInt(Server.clients_peak);
Server.del(); // delete server and clients before deleting worlds
}
The above code can be found in Main.cpp from the Esenthel MMO server, except for the File commands.
It succesfully creates a .txt file in the mentioned folder, but when I open the folder, I get this symbol, and not a number "[]" (but then connected and smaller).
When the Server.clients_peak is 0, it says nothing in the file, except for a few spaces, and when it is 1, it writes that symbol.
How would I fix this small problem?
Thanks in advance!
SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
|
|
01-27-2011 02:30 PM |
|
Esenthel
Administrator
|
RE: Server Should save last information
File saves binary data
probably what you want is FileText, check for its tutorials
|
|
01-27-2011 02:40 PM |
|
Dwight
Member
|
RE: Server Should save last information
Code:
void Shut()
{
{
FileText f; // FileText object
f.write ("C:/Esenthel MMO/Storage/Info/Information.txt");
f.put ("Accounts That Were Connected Before Shutdown = ",Server.clients_peak);
}
Server.del(); // delete server and clients before deleting worlds
OSLaunch("C:/Esenthel MMO/Storage/Info/Information.txt");
}
If someone needs it too, this works just sweet
Thanks Esenthel!
SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
|
|
01-27-2011 02:51 PM |
|