[FIXED]Somekind of mistake
#1

Okay, so its my first time using the getdate and gettime function.
First heres my code :
pawn Код:
new year, month, day, hour, minute, seconds;

format(string, sizeof(string), "Date : %d/%d/%d Time : Hour %d Time %d Seconds %d", getdate(year, month, day), gettime(hour, minute, seconds));
dini_Set(file, "Registered Date", string);
dini_Set(file, "Last On", string);
and heres what writes down on the ini :
Код:
Registered Date=Date : 159/1275993401/1023410176 Time : Hour 61 Time 3997696 Seconds 724828160
Last On=Date : 159/1275993401/1023410176 Time : Hour 61 Time 3997696 Seconds 724828160
I know I'm scripting it wrongly xD so help!

Thanks.

FIXED!
Reply
#2

I've never used this function, but I think it's about this:

You need to store the variables "Year, Month, Day, Hour, Minute, Seconds" first, then insert them into the string.

so:

pawn Код:
new year, month, day, hour, minute, seconds;
getdate(year, month, day);
gettime(hour, minute, seconds);
format(string, sizeof(string), "Date : %d/%d/%d Time : Hour %d Time %d Seconds %d",year,month,day,hour,minute,seconds );
dini_Set(file, "Registered Date", string);
dini_Set(file, "Last On", string);
Reply
#3

Quote:
Originally Posted by Hiddos
I've never used this function, but I think it's about this:

You need to store the variables "Year, Month, Day, Hour, Minute, Seconds" first, then insert them into the string.

so:

pawn Код:
new year, month, day, hour, minute, seconds;
getdate(year, month, day);
gettime(hour, minute, seconds);
format(string, sizeof(string), "Date : %d/%d/%d Time : Hour %d Time %d Seconds %d",year,month,day,hour,minute,seconds );
dini_Set(file, "Registered Date", string);
dini_Set(file, "Last On", string);
yeah lol xD fixed it a couple of minutes ago
but thanks anyways
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)