Saving Password Bug.
#1

Hey,

I am having a problem saving the player password.

When a player register, then try to login, it always fails because the Password string on the file is like this: Password=
It does not shows anything after "=" .

How can i fix this ?

When a player regists:
pawn Код:
dcmd_register(playerid,params[])
{
   if (Logged[playerid]) return SystemMsg(playerid,"[ » ] Already Logged in !");
 
   
    new player[128];
    format(player, sizeof(player),"users/%s.txt",PlayerName(playerid));

  if(dini_Exists(player)) return SystemMsg(playerid,"[ » ] Account already exists, please use '/login password'.") &&  GameTextForPlayer(playerid,"~w~Use~r~/login (password)",5000,6);

    if(strlen(params)==0) return SystemMsg(playerid,"[ » ] Correct usage: '/register password'") && GameTextForPlayer(playerid,"~r~Use /register (password)",5000,6);
   
  if(dini_Create(player)) return SystemMsg(playerid,"[ » ] Account successfully created. Login with '/login password' now !") &&   SetJob(playerid,1) && AddItemToPlayerInventory(playerid,CHECKBANK20,1,"Check +20EP") &&  GameTextForPlayer(playerid,"~r~Use~w~/login (password)",5000,6);

    strmid(PlayerData[playerid][Pass], params, 0, strlen(params), 255);
   
  return false;
 }
SaveData tool (used OnPlayerDisconnect):
pawn Код:
forward SaveData(playerid);
public SaveData(playerid)
{
    new player[128];new saver[128];
    new pname[MAX_PLAYER_NAME];
   
    GetPlayerName(playerid,pname,sizeof(pname));
   
    format(player, sizeof(player), "users/%s.txt",pname);

    format(saver,sizeof(saver),"Password");
  dini_Set(player,saver,PlayerData[playerid][Pass]);
}
I hop get some help,
Best Regards.
Reply
#2

This has got to be the ugliest script I've seen in a very long time.

Just use one damn line for each function, i don't see the problem. Fix it so we can read it without decrypting this secret code..
Reply
#3

Quote:
Originally Posted by Lavamike
This has got to be the ugliest script I've seen in a very long time.

Just use one damn line for each function, i don't see the problem. Fix it so we can read it without decrypting this secret code..
O rly?
Reply
#4

Quote:
Originally Posted by Jafri
O rly?
Really.
Reply
#5

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Jafri
O rly?
Really.
Mmkay :P
Reply
#6

Quote:
Originally Posted by Lavamike
This has got to be the ugliest script I've seen in a very long time.

Just use one damn line for each function, i don't see the problem. Fix it so we can read it without decrypting this secret code..
I don't care if you have a problem by the way i script.

What do you don't understand ? The problem is @ password saving to file.
Reply
#7

OMFG ? Unstead of helping me you're looking at my way of script. I don't fucking care.


Can someone help me with this ? Please
Reply
#8

Some one help him.
Reply
#9

Quote:
Originally Posted by Jafri
Some one help him.
No .. It's Da Vinci Code for them !

Btw i already fixed it so, thanks for all .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)