Y_ini , questions
#1

Hello I'm learning scripting and I'm trying to make a Login/register system myself. It'll be difficult for me as a beginner, but it will certainly enlarge my knwoledge.
Anyway here are my questions:

For now All I want is: when the player enters a password in the DialogBox a new ini with his name will be created (exp: playerA.INI) and the password will be added to the ini and then, another variable called "userpass" should get the player's password from the ini file (i know it's stupid but just answer me please)

So here is the code I created (I'm not sure about it)
pawn Код:
INI:playernameini[Password](name[], value[])
{
    new userpass[25];
    INI_String("password", userpass, sizeof(userpass));

}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (!response) Kick(playerid);
else if (response)
{

    new playernameini[MAX_PLAYER_NAME+4], playername[MAX_PLAYER_NAME];
 
    GetPlayerName(playerid, playername, sizeof(playername));
    format(playernameini, sizeof(playernameini), "%s.INI", playername);
    new INI:data=INI_Open(playernameini);
    INI_SetTag(data, "Password");
    INI_WriteString(data, "password", inputtext);
    INI_Load(playernameini);
    printf("pass is %s", userpass);
   
    INI_Close(data);
}
return 1;
}
So, Will playernameini ,which is as far as i know a local variable, work in the INI:function ?
and i'm getting this error
Код:
(299) : error 017: undefined symbol "userpass"
, well userpass should contain the player's password, why doesn't it work when I INI_Load(playernameini) under
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
please take your time, if you can't understand me tell me so I can explain, and put in mind that I am a beginner and I started from 0 about 5 days ago
Reply


Messages In This Thread
Y_ini , questions - by Sarra - 05.08.2014, 23:18
Re: Y_ini , questions - by GeekSiMo - 06.08.2014, 00:04
Re: Y_ini , questions - by Sarra - 06.08.2014, 00:11
Re: Y_ini , questions - by Sarra - 06.08.2014, 00:46
Re: Y_ini , questions - by Jack_Leslie - 06.08.2014, 00:56
Re: Y_ini , questions - by Sarra - 06.08.2014, 01:10
Re: Y_ini , questions - by Sarra - 06.08.2014, 07:02
Re: Y_ini , questions - by Infern0 - 06.08.2014, 10:49

Forum Jump:


Users browsing this thread: 2 Guest(s)