18.07.2012, 21:37
I'm using Y_INI, and creating a dialog-based login, but the file doesn't even get created. Can anyone see anything wrong with the following code?
Yes, the dialog is shown, but once you enter your password, nothing happens, nor do the Client Messages get sent.
pawn Код:
case DIALOG_REGISTER: // Pretty self explainatory.
{
if( isnull( inputtext ) )
{
SHOWDIALOG_REGISTER;
}
else
{
new
INI: theirFile = INI_Open( FindPlayerFile( playerid ) );
INI_SetTag( theirFile, "data" );
INI_WriteInt( theirFile, "Passcode", udb_hash( inputtext ) );
INI_WriteInt( theirFile, "Level", 1 );
INI_WriteInt( theirFile, "XP", 1 );
INI_Close( theirFile );
SendClientMessage( playerid, -1, "1" );
SetSpawnInfo( playerid, 255,
plStats [ playerid ] [ Skin ],
plStats [ playerid ] [ LastPosition ] [ 0 ],
plStats [ playerid ] [ LastPosition ] [ 1 ],
plStats [ playerid ] [ LastPosition ] [ 2 ],
plStats [ playerid ] [ LastPosition ] [ 3 ],
0,0, 0,0, 0,0
);
SpawnPlayer( playerid );
SendClientMessage( playerid, -1, "2" );
}
}