• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] sqlite and inputtext
#5
(2021-03-21, 08:25 PM)Bakr Wrote:
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

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.
  Reply


Messages In This Thread
sqlite and inputtext - by robertocaribbean - 2021-03-21, 05:42 PM
RE: sqlite and inputtext - by Pinch - 2021-03-21, 05:45 PM
RE: sqlite and inputtext - by robertocaribbean - 2021-03-21, 06:37 PM
RE: sqlite and inputtext - by Bakr - 2021-03-21, 08:25 PM
RE: sqlite and inputtext - by robertocaribbean - 2021-03-21, 08:50 PM
RE: sqlite and inputtext - by Threshold - 2021-03-24, 04:46 AM
RE: sqlite and inputtext - by robertocaribbean - 2021-03-24, 02:14 PM

Forum Jump: