Checking weekdays
#4

You can't compare strings in that way, you should pass the current date in the stock and then return it as a string, and for comparing two string you should use strcmp
https://sampwiki.blast.hk/wiki/Strcmp

so the code becomes
Код:
new Year, Month, Day;
getdate(Year, Month, Day);
if(!strcmp(GetWeekDay(Day, Month, Yeaer), "Saturday"), 1)
{
printf("Today is Saturday!");
}
(You shold have only the GetWeekDay stock)
Reply


Messages In This Thread
Checking weekdays - by siemka321 - 31.08.2013, 19:31
Re: Checking weekdays - by Rapgangsta - 31.08.2013, 19:55
Re: Checking weekdays - by siemka321 - 31.08.2013, 20:17
Re: Checking weekdays - by Rapgangsta - 31.08.2013, 20:29
Re: Checking weekdays - by siemka321 - 31.08.2013, 21:03
Re: Checking weekdays - by Rapgangsta - 31.08.2013, 21:29
Re: Checking weekdays - by siemka321 - 31.08.2013, 21:49
Re: Checking weekdays - by Rapgangsta - 31.08.2013, 22:41
Re: Checking weekdays - by siemka321 - 01.09.2013, 06:44

Forum Jump:


Users browsing this thread: 2 Guest(s)