Register date small problem
#1

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
Reply
#2

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);
Reply
#3

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);
Reply
#4

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.
Reply
#5

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?
Reply
#6

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

Done,thank you both!
Reply
#8

It works?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)