Code generator
#1

Hi guys,
I want make one function which create code(for account activation etc...) with time and date.... Code must have 14 numbers(eg. 05100820140611, 05 - hour; 10 - minute; 08 - second; 2014 - year; 06 - month; 11 - day). I made this, but I got negativ code(code in minus).

Код:
stock _SoD_GenerateCode()
{
	new _dan, _mjesec, _godina;
	new _sat, _minuta, _sekunda;
	new _code[15];

	getdate(_godina, _mjesec, _dan);
	gettime(_sat, _minuta, _sekunda);

	format(_code, 15, "%02d%02d%02d%d%02d%02d", _sat, _minuta, _sekunda, _godina, _mjesec, _dan);
	return _code;
}
Reply


Messages In This Thread
Code generator - by vannesenn - 10.10.2014, 16:51
Re: Code generator - by SKAzini - 10.10.2014, 17:04
Re: Code generator - by Pottus - 10.10.2014, 17:39
Re: Code generator - by vannesenn - 10.10.2014, 17:41
Re: Code generator - by biker122 - 10.10.2014, 17:46
Re: Code generator - by vannesenn - 10.10.2014, 17:51
Re: Code generator - by Pottus - 10.10.2014, 18:00
Re: Code generator - by vannesenn - 10.10.2014, 18:19
Re: Code generator - by SimonItaly - 10.10.2014, 18:28
Re: Code generator - by Pottus - 10.10.2014, 20:37

Forum Jump:


Users browsing this thread: 1 Guest(s)