Arguement type mismatch (arguement 3) - 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: Arguement type mismatch (arguement 3) (
/showthread.php?tid=620379)
Arguement type mismatch (arguement 3) -
NealPeteros - 29.10.2016
PHP код:
new INI:File = INI_Open(UserPath(playerid));
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
INI_WriteInt(File, "IP", plrIP);
INI_Close(File);
Did I do something wrong here? The error line is this
PHP код:
INI_WriteInt(File, "IP", plrIP);
Re: Arguement type mismatch (arguement 3) -
SyS - 29.10.2016
GetPlayerIp(); return a string so plrIP var will be a string
and 3rd arguement on
INI_WriteInt(_, _,int); is an integer
you can use
INI_WriteString() for this purpose
Re: Arguement type mismatch (arguement 3) -
Kaliber - 29.10.2016
You use WriteInt for a string...a string is not an Integer...
So use INI_WriteString
Re: Arguement type mismatch (arguement 3) -
NealPeteros - 29.10.2016
Oh...
Never used GetPlayerIp before. Thanks! +rep
EDIT: Kaliber, the system is not letting me give you a rep. lol

I'll give you soon.
Re: Arguement type mismatch (arguement 3) -
NealPeteros - 31.10.2016
Sorry for bumping
PHP код:
INI_WriteString(File,"Password",strval(inputtext)); //I'm just curious if you can save a user's password without using any hash.
It's called on OnDialogResponse
Re: Arguement type mismatch (arguement 3) -
Threshold - 31.10.2016
No, you should NEVER save a user's un-hashed password. It's a breach of their personal security and is in most cases illegal.
This function was added for people who refused to use includes or plugins that were required for more secure hashes:
https://sampwiki.blast.hk/wiki/SHA256_PassHash
Another popular method is Whirlpool:
https://sampforum.blast.hk/showthread.php?tid=570945
If you don't know how to use SHA256_PassHash, here's a small tutorial for you:
https://sampforum.blast.hk/showthread.php?tid=581336