SA-MP Forums Archive
Register date small problem - 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)
+--- Thread: Register date small problem (/showthread.php?tid=385202)



Register date small problem - Face9000 - 14.10.2012

Hello,this is the variables when a player register:

pawn Код:
new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","{FF0000}You have entered an invalid password.\n""Type your password below to register a new account.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File, "RegisterDate", Day,Month,Year,Hour,Minute,Second);
As you can see, i'm trying to save the register date in the player account file, but i got error in this line:

pawn Код:
INI_WriteInt(File, "RegisterDate", Day,Month,Year,Hour,Minute,Second);
warning 202: number of arguments does not match definition


Re: Register date small problem - Finn - 14.10.2012

pawn Код:
INI_WriteInt(File, "RegisterDate_day", Day);
INI_WriteInt(File, "RegisterDate_mon", Month);
INI_WriteInt(File, "RegisterDate_year", Year);
INI_WriteInt(File, "RegisterDate_hour",Hour);
INI_WriteInt(File, "RegisterDate_min", Minute);
INI_WriteInt(File, "RegisterDate_sec", Second);



Re: Register date small problem - lorizz - 14.10.2012

you should put him 1x1 like that xD:
Код:
INI_WriteInt(File, "RegisterDate_year", Year);
INI_WriteInt(File, "RegisterDate_month", Month);
INI_WriteInt(File, "RegisterDate_day", Day);
INI_WriteInt(File, "RegisterDate_hour", Hour);
INI_WriteInt(File, "RegisterDate_minute", Minute);
INI_WriteInt(File, "RegisterDate_second", Second);



Re: Register date small problem - zDevon - 14.10.2012

Write a string instead of an integer. Then, use format to gather all of the variables into one string, and write the new string to the file.


Re: Register date small problem - Face9000 - 14.10.2012

Quote:
Originally Posted by zDevon
Посмотреть сообщение
Write a string instead of an integer. Then, use format to gather all of the variables into one string, and write the new string to the file.
Any example?


Re: Register date small problem - lorizz - 14.10.2012

no logitech he's totally wrong, follow me and Finn


Re: Register date small problem - Face9000 - 14.10.2012

Done,thank you both!


Re: Register date small problem - lorizz - 14.10.2012

It works?