enum and string, limit? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: enum and string, limit? (
/showthread.php?tid=580049)
enum and string, limit? -
liquor - 02.07.2015
Does anybody know if 'enums' has got a limit on how large strings that can be stored?
Here's what I did,
pawn Код:
enum playerdata
{
pPassword[129],
.....
// the rest
}
new pData[MAX_PLAYERS][playerdata];
As you might understand it's a Whirlpool hash string.
I made a debug print, and when i try to store this hash in that string, the string remains empty.
Код:
[17:28:34] Load password: <- this is pData[playerid][pPassword]
[17:28:36] Input: tsakfasf
[17:28:36] Encr. input: 152AFCC2920528978F9140C1968DDE6708D6F82AFC344FDDF171DD5B3188CC4F2758094B1B2415D8F9720B93351620B63BFD9B4CC97DAE2B6A8E211F132F1A30
[17:28:36] Length: 128 (of encrypted input)
Wrong password ofcourse, but the problem remains and !strcmp returns 1, which lets the player in.....
When i instead of using that string create another one, like
It works like a charm and the string gets stored and i can compare the stored hash with the encrypted password input hash...
Re: enum and string, limit? -
iTakelot - 02.07.2015
No double-pole read the rules