YSI warnings - 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: YSI warnings (
/showthread.php?tid=556144)
YSI warnings -
Raaf - 09.01.2015
Hey guys,
I'm trying out this function but it doesn't work for me.
Anybody got some advice?
This are the errors:
Код:
C:\Users\brandonpc\Desktop\SA-MP RP\gamemodes\testing.pwn(270) : warning 202: number of arguments does not match definition
C:\Users\brandonpc\Desktop\SA-MP RP\gamemodes\testing.pwn(272) : warning 202: number of arguments does not match definition
Код:
//register function
stock Register(playerid,key[])
{
new PlayerData[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(PlayerData,sizeof(PlayerData),"/players/%s.ini",name);
new INI:Player = INI_Open("/players/%s.ini",PlayerData);
INI_SetTag(Player,"data");
INI_SetTag(Player,"Password",key);
INI_Close(Player);
ShowPlayerDialog(playerid, DIALOG_REGISTER_SUCCESS, DIALOG_STYLE_MSGBOX, "Welcome", "You are succesfully registered, enjoy our server!", "Ok", "");
return 1;
}
Peace,
Raaf
Re: YSI warnings -
bgedition - 09.01.2015
Quote:
Originally Posted by Raaf
Код:
new INI:Player = INI_Open("/players/%s.ini",PlayerData);
|
should be
pawn Код:
new INI:Player = INI_Open("/players/%s.ini",name);
Re: YSI warnings -
Raaf - 09.01.2015
Quote:
Originally Posted by bgedition
should be
pawn Код:
new INI:Player = INI_Open("/players/%s.ini",name);
|
Didn't work, same errors.
Re: YSI warnings -
bgedition - 09.01.2015
Try this may be is same but try
pawn Код:
new INI:Player = INI_Open(PlayerData);
Re: YSI warnings -
Raaf - 09.01.2015
Quote:
Originally Posted by bgedition
Try this may be is same but try
pawn Код:
new INI:Player = INI_Open(PlayerData);
|
It worked, one error disappeared but still line 272 is giving me the same error.
Код:
INI_SetTag(Player,"Password",key);
Got a idea?
Re: YSI warnings -
bgedition - 09.01.2015
Change
Код:
INI_SetTag(Player,"Password",key);
to
pawn Код:
INI_WriteString(Player,"Password",key);
Re: YSI warnings -
Raaf - 09.01.2015
Quote:
Originally Posted by bgedition
Change
Код:
INI_SetTag(Player,"Password",key);
to
pawn Код:
INI_WriteString(Player,"Password",key);
|
It worked, you're the best! +1 Rep for you.
Re: YSI warnings -
FunnyBear - 09.01.2015
Quote:
Originally Posted by Raaf
It worked, one error disappeared but still line 272 is giving me the same error.
Код:
INI_SetTag(Player,"Password",key);
Got a idea?
|
I'm not 100% sure on this, this might be wrong.
Try
pawn Код:
new pass[24];
format(pass, sizeof(pass), "Password", key);
INI_SetTag(Player, pass);
Re: YSI warnings -
bgedition - 09.01.2015
Thank you.