Can anyone tell me why is this happening!
#1

Hello guys just check this code :
pawn Код:
PlayerInfo[playerid][Password] = file_dGetStr(UserPath(playerid), "Password");
I am getting player's password on connect and then saving it into his enum the "dGetStr" is a direct line reading method (i am using Southclaw's INI system).

Now my problem is when i compile i get this
Код:
error 047: array sizes do not match, or destination array is too small
on that specific line
Reply
#2

use format
pawn Код:
format(PlayerInfo[playerid][Password] = file_dGetStr(UserPath(playerid), "Password"));
let me know if any errors
Reply
#3

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
use format
pawn Код:
format(PlayerInfo[playerid][Password] = file_dGetStr(UserPath(playerid), "Password"));
let me know if any errors
You can't use enum variables inside format

Any other ideas ?
Reply
#4

can i see your defines please?
Reply
#5

The cell size of PlayerInfo[playerid][Password] must be equal or bigger to the cell size that is returned by the function. If you don't know the cell size returned by the function, then look it up in the include.
Reply
#6

I only have one define which is the USER_PATH define.

EDIT: @Vince : Thanks it worked apparently the size in the include is 256 and i am using 129 however when i changed the password length in my enum to 256 it compiled without errors but since i am using Whirlpool (Which hashes passwords with 128 characters + one null terminator) so i don't want to use a cell 256 big in size for that it is a performance drawback.

However can i do it any other way ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)