Saving Date - 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: Saving Date (
/showthread.php?tid=439194)
Saving Date -
nor15 - 24.05.2013
I use this to save the date the file is created when registering
PHP код:
new Year, Month, Day;
getdate(Year, Month, Day);
format(string,sizeof(string),"%02d/%02d/%d", Day, Month, Year);
INI_WriteInt(File,"DateJoined",string);
But i get this error
PHP код:
F:\SFCRRPGv1.1\Los Santos TDM\gamemodes\new.pwn(4571) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Re: Saving Date -
Hawky133 - 24.05.2013
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
Re: Saving Date -
Face9000 - 24.05.2013
You are creating a new string, so it should be "INI_WriteString" not "INI_WriteInt" (Integrer).
Re: Saving Date -
nor15 - 24.05.2013
thanks both