From dini to SII -
w3sker - 10.07.2012
Well
Iґam want to change my filesystem from dini so SII.
How to change
Код:
dini_Get(player, "pass")
into SII have try it with "INI_ReadString" but its dosenґt want work.
Have the same problems with these
Код:
dini_Int(player,"level")
Код:
dini_IntSet(player,"level",GetPlayerScore(playerid));
to change it in SII
Re: From dini to SII -
coole210 - 10.07.2012
Any errors/warnings? What do you mean by "it doesn't want to work" ?
Re: From dini to SII -
w3sker - 10.07.2012
Код:
error 035: argument type mismatch (argument 2)
Have try to change this
Код:
if(!strcmp(key,dini_Get(data, "password"),false))
into
Код:
if(!strcmp(key,INI_ReadString(data,"password",64),false))
The syntax of INI_ReadString is INI_ReadString(variable,"xyz",MAX_SIZE)
Re: From dini to SII -
clarencecuzz - 10.07.2012
Have you tried:
pawn Код:
if(strcmp(key, INI_ReadString(data,"password",64), false) == 0)
??
Might not work, but does in some cases.
Re: From dini to SII -
w3sker - 10.07.2012
donґt work for me, same error
Код:
error 035: argument type mismatch (argument 2)
Re: From dini to SII -
clarencecuzz - 10.07.2012
Try something like this:
pawn Код:
new str;
str = INI_ReadString(data,"password",64);
if(strcmp(key, str, false) == 0)
Tell me if it gives the same error or lists a different error.
Re: From dini to SII -
w3sker - 10.07.2012
Код:
stock Login(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(!strcmp(key,dini_Get(data, "password"),false))
{
LoadAccount(playerid);
SendClientMessage(playerid,BLUE,"Info: logged in!");
PlayerPlaySound(playerid,1150,0,0,0);
return 1;
}
else
{
SendClientMessage(playerid,RED,"Error: wrong password");
PlayerPlaySound(playerid,5201,0,0,0);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Info: your account was foundet.","Login","Cancel");
return 1;
}
}
Can you please show me what you mean?
Re: From dini to SII -
clarencecuzz - 10.07.2012
pawn Код:
stock Login(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
new str;
str = dini_get(data, "password");
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(!strcmp(key,str,false))
{
LoadAccount(playerid);
SendClientMessage(playerid,BLUE,"Info: logged in!");
PlayerPlaySound(playerid,1150,0,0,0);
return 1;
}
else
{
SendClientMessage(playerid,RED,"Error: wrong password");
PlayerPlaySound(playerid,5201,0,0,0);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Info: your account was foundet.","Login","Cancel");
return 1;
}
}
I want you to see if this compiles properly.
Re: From dini to SII -
w3sker - 10.07.2012
No my Problem is to change the Dini Filesystem to SII Filesystem.
https://sampforum.blast.hk/showthread.php?tid=58458