2021-03-21, 08:25 PM
Code:
gUserData[playerid][USER_PASSWORD] = inputtext[strlen(inputtext)];
That's your problem.
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'
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:
strcat(gUserData[playerid][USER_PASSWORD], inputtext, 20);
May I interest you? https://burgershot.gg/showthread.php?tid=1419