08.08.2016, 16:33
Hello.
I think you are a little bit confused, aren't you?
"month" is an integer so evmonth should be an integer too.
"day" is an integer so evday should be an integer too.
This will be the correct version.
Note: Please change the field-type of "evday" and "evmonth" from VARCHAR to "Int".
I think you are a little bit confused, aren't you?

"month" is an integer so evmonth should be an integer too.
"day" is an integer so evday should be an integer too.
PHP код:
new evday;
new evmonth;
LoadEvents()
{
new day, month, year;
getdate(year, month, day);
cache_get_field_content(0, "evtext", event, mysql, 129);
evday = cache_get_field_content_int(0, "evday", mysql);
evmonth = cache_get_field_content_int(0, "evmonth", mysql);
if(month == evmonth && day == evday)
{
for(new i = 0; i < MAX_EVENTS; i++)
{
if(Events[i][EvName] != 0 && Events[i][Day] != 0 && Events[i][Month] != 0)
{
if(year == 2016)
{
format(string, sizeof(string), "[BOT]: Happy %s (%02d/%02d)", event, GetDay(day,month), GetMonth(month));
}
else
{
format(string, sizeof(string), "[BOT]: Happy %s (%02d/%02d)", event, ReturnDayName(GetDayOfWeek(year, month, day)), GetMonth(month));
}
SendClientMessageToAll(-1, string);
Events[i][EvName] == event;
}
}
}
return 1;
}
Note: Please change the field-type of "evday" and "evmonth" from VARCHAR to "Int".
