Date problem
#1

pawn Code:
public UpdateDate()
{
    new day, month;
       getdate(day, month);
        new mtext[20];
    if(month == 1) { mtext = "January"; }
    else if(month == 2) { mtext = "February"; }
    else if(month == 3) { mtext = "March"; }
    else if(month == 4) { mtext = "April"; }
    else if(month == 5) { mtext = "May"; }
    else if(month == 6) { mtext = "June"; }
    else if(month == 7) { mtext = "Juli"; }
    else if(month == 8) { mtext = "August"; }
    else if(month == 9) { mtext = "September"; }
    else if(month == 10) { mtext = "October"; }
    else if(month == 11) { mtext = "November"; }
    else if(month == 12) { mtext = "December"; }
    format(datestr,sizeof(datestr),"%d %s",day,mtext);
    TextDrawSetString(clock,datestr);
}
Wed day instead, put year, so instead of being 21 November, is 2010 November.
Reply
#2

reply ?
Reply
#3

getdate is year, month, day. So your variable "day" is actually getting the year.

pawn Code:
getdate(year, month, day);
Reply
#4

pawn Code:
new Year, Month, Day; getdate(Year, Month, Day);
format(datestr, sizeof(datestr), "%s | %d | %d", mtext, Day, Year);
TextDrawSetString(clock, datestr);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)