Password problems
#1

I'm using this scripts but the password isn't saved on scriptfiles/users/blablabla.ini
pawn Код:
new file[64], IP[16], string[128], password[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            if(!dini_Exists(file))
            {
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Create(file);
                dini_Set(file, "Password", password);
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pLevel] = 1;
                dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
                format(string, sizeof(string), "SERVER: {FFFFFF}You have successfully registered on {FF6347}blablabla Roleplay{FFFFFF}.", inputtext);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
Reply
#2

What do you expect? You're writing an empty string.
Reply
#3

what do you mean? i don't get it, can you just tell me the right scripts?
Reply
#4

maybe this should work ?
hope
pawn Код:
new file[64], IP[16], password[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            if(!dini_Exists(file))
            {
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Create(file);
                dini_Set(file, "Password", password);
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pLevel] = 1;
                dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
Reply
#5

My real script is
pawn Код:
new file[64], IP[16], string[128], password[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            if(!dini_Exists(file))
            {
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Create(file);
                dini_Set(file, "Password", password);
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pLevel] = 1;
                dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
                format(string, sizeof(string), "SERVER: {FFFFFF}You have successfully registered on {FF6347}blablabla Roleplay{FFFFFF}.", inputtext);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
when I using your scripts, FATAL ERROR.
Reply
#6

Bump, I am really need help.
Reply
#7

print out the value of password before writing it to the file and you will understand what Vince is saying. ( printf("Password: %s", Password); )
Reply
#8

pawn Код:
new file[64], IP[16], string[128], password[256];
So you want to save a password? Dat's expert!
Reply
#9

Quote:
Originally Posted by Revo
Посмотреть сообщение
print out the value of password before writing it to the file and you will understand what Vince is saying. ( printf("Password: %s", Password); )
Can you tell me the right scripts? I still dont understand
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)