Again argument mismatch. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Again argument mismatch. (
/showthread.php?tid=174118)
Again argument mismatch. -
sekol - 04.09.2010
So i'm trying to make register/login system in dialogs
I'm trying to learn from my fails but i really don't know what i'm doing
I'm using Djson
Код:
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(149) : warning 215: expression has no effect
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(150) : error 035: argument type mismatch (argument 3)
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(154) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pSelect] == 0;
if(!djIsSet("%s.json","player/name", name))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register","Enter your password below:","Register","Cancel");
}
else if(djIsSet("%s.json","player/name", name))
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Cancel");
}
}
Re: Again argument mismatch. -
woot - 04.09.2010
PlayerInfo[playerid][pSelect] = 0;
Re: Again argument mismatch. -
sekol - 04.09.2010
Quote:
Originally Posted by exora
PlayerInfo[playerid][pSelect] = 0;
|
Still those arguments errors
Re: Again argument mismatch. -
Calgon - 04.09.2010
pawn Код:
if(!djIsSet("%s.json","player/name", name))
You need to create a string, format it (using format) and then use the string name in the djIsSet function.
Re: Again argument mismatch. -
sekol - 04.09.2010
Tell me if i did it correct
Код:
new name[MAX_PLAYER_NAME];
new string[128];
new file[128];
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pSelect] == 0;
format(file,sizeof(file),"%s.json","player/name",name);
if(!djIsSet(file))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register","Enter your password below:","Register","Cancel");
}
else if(djIsSet(file))
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Cancel");
}
}
I'm gettin' only those warnings
Код:
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(153) : warning 202: number of arguments does not match definition
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(157) : warning 202: number of arguments does not match definition
C:\Users\Machlik\Downloads\samp03bsvr_R2_win32\gamemodes\Untitled.pwn(148) : warning 204: symbol is assigned a value that is never used: "string"
If it's good please give me a point how to make password save