getdate(); weird outputs
#1

Hi, I don't post here often but I've come across a problem.

I use this code when loading my houses but it outputs "289" in the print: "new date = getdate();"

Thanks
Reply
#2

send us sourcecode please
Reply
#3

There is NO need. But okay:

Reply
#4

getdate() returns the day of the year if no parameters are used.
Reply
#5

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
getdate() returns the day of the year if no parameters are used.
I thought it outputs a unix-timestamp of the date...
Reply
#6

Lol!

Код:
new date = getdate();
printf("%d", date);
prints the days

Found this on WIKI
Код:
new Days = getdate();
printf("Days since the start of the year: %d", Days);
Must check this out: https://sampwiki.blast.hk/wiki/Getdate
Reply
#7

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
I thought it outputs a unix-timestamp of the date...
gettime() does.
Reply
#8

1: is this a picture?
2: Use a Codebox
PHP код:
new day,mon,year;
getdate(year,mon,day);
printf(%d.%d.%d,day,mon,year); 
This should work
Reply
#9

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
gettime() does.
Thanks, I'm blind. +repped
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)