2021-03-21, 08:50 PM
(This post was last modified: 2021-03-21, 08:52 PM by robertocaribbean.)
(2021-03-21, 08:25 PM)Bakr Wrote:That's your problem.Code:gUserData[playerid][USER_PASSWORD] = inputtext[strlen(inputtext)];?
You're assigned EOS to the first element of gUserData[playerid][USER_PASSWORD], which results in an empty string. Just concatenate it to the array.Code:inputtext="Hello"
[0] = 'H'
[1] = 'e'
[2] = 'l'
[3] = 'l'
[4] = 'o'
[5] = '\0' EOS
strlen(inputtext) = 5;
inputtext[strlen(inputtext)] = inputtext[5] = '\0'
Code:strcat(gUserData[playerid][USER_PASSWORD], inputtext, 20);
May I interest you? https://burgershot.gg/showthread.php?tid=1419
Thank you very much for the explanation! I found the code and what you have explained helpfully. The database stores the passwords now.
I'm going to take a look at samp-account, it looks interesting.