Saving Date
#1

I use this to save the date the file is created when registering

PHP код:
new YearMonthDay;
                
getdate(YearMonthDay);
                
format(string,sizeof(string),"%02d/%02d/%d"DayMonthYear);
                
INI_WriteInt(File,"DateJoined",string); 
But i get this error
PHP код:
F:\SFCRRPGv1.1\Los Santos TDM\gamemodes\new.pwn(4571) : error 035argument type mismatch (argument 3)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Reply
#2

Hello there.
Whenever you get "error 035: argument type mismatch (argument #)", it basically means you're giving the wrong type of data to a function.

The # will tell you which argument or parameter is the wrong type. In this case, it's the third argument for the function INI_WriteInt.
If you read this page for the YSI INI include, it will tell you that the third argument should be an integer (whole number).

Since you are saving a string and not an integer, you should be using INI_WriteString instead of INI_WriteInt
Reply
#3

You are creating a new string, so it should be "INI_WriteString" not "INI_WriteInt" (Integrer).
Reply
#4

thanks both
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)