From dini to SII
#1

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
Reply
#2

Any errors/warnings? What do you mean by "it doesn't want to work" ?
Reply
#3

Код:
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)
Reply
#4

Have you tried:
pawn Код:
if(strcmp(key, INI_ReadString(data,"password",64), false) == 0)
??
Might not work, but does in some cases.
Reply
#5

donґt work for me, same error
Код:
error 035: argument type mismatch (argument 2)
Reply
#6

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.
Reply
#7

Код:
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?
Reply
#8

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.
Reply
#9

No my Problem is to change the Dini Filesystem to SII Filesystem.

https://sampforum.blast.hk/showthread.php?tid=58458
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)