27.05.2015, 17:20
Hi!I have a gamemode that I running in Windows and runs good without crashing.
I bought a new hiost with OS LINUX and the server connect to database OK ,all loading good server is up
I log in ,register or type password to login I spawn and the server crash...I loaded plugin crashdetect.so and nothing
#define _WIN32
//#define _LINUX
//new File:dumpfile; // global variable for buffer overflow protection
#if defined _WIN32
new File:logfile; // global variable for buffer overflow protection
#endif
stock Log(sz_fileName[], sz_input[]) {
new
sz_logEntry[180],
#if defined _LINUX
File: logfile,
#endif
i_dateTime[2][3];
gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%02i:%02i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
if(logfile) fclose(logfile);
if(!fexist(sz_fileName)) logfile = fopen(sz_fileName, io_write);
else logfile = fopen(sz_fileName, io_append);
if(logfile)
{
fwrite(logfile, sz_logEntry);
fclose(logfile);
}
return 1;
}
I bought a new hiost with OS LINUX and the server connect to database OK ,all loading good server is up
I log in ,register or type password to login I spawn and the server crash...I loaded plugin crashdetect.so and nothing
#define _WIN32
//#define _LINUX
//new File:dumpfile; // global variable for buffer overflow protection
#if defined _WIN32
new File:logfile; // global variable for buffer overflow protection
#endif
stock Log(sz_fileName[], sz_input[]) {
new
sz_logEntry[180],
#if defined _LINUX
File: logfile,
#endif
i_dateTime[2][3];
gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%02i:%02i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
if(logfile) fclose(logfile);
if(!fexist(sz_fileName)) logfile = fopen(sz_fileName, io_write);
else logfile = fopen(sz_fileName, io_append);
if(logfile)
{
fwrite(logfile, sz_logEntry);
fclose(logfile);
}
return 1;
}