[FIXED]Somekind of mistake - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [FIXED]Somekind of mistake (
/showthread.php?tid=153306)
[FIXED]Somekind of mistake -
ViruZZzZ_ChiLLL - 08.06.2010
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!
Re: Somekind of mistake -
Hiddos - 08.06.2010
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);
Re: Somekind of mistake -
ViruZZzZ_ChiLLL - 08.06.2010
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