error 047: array sizes do not match, or destination array is too small
#1

pawn Код:
pRank[129], //in the enum at the top of the script



    pInfo[Player][pRank] = "New Member"; //inside a command.
The line that's in the command gives me the error error 047: array sizes do not match, or destination array is too small.
Any ideas?
Reply
#2

Remove the 129, it sets a size that you don't need, as the size is relative to what you put into it.
Reply
#3

What should I have then? pRank[], pRank, etc?
Reply
#4

pRank[64]; is enough i think
Reply
#5

@Gamer_007 same problem.
Reply
#6

Fixed.
Reply
#7

See, if you do:
pawn Код:
some_@_array[ 128 ] = " ";
You'll receive that. However, if you do:
pawn Код:
some_@_array[ 5 ] = "abcde";
You won't.
I hope you understand what I mean.

EDIT: I was too late.
Reply
#8

I actually just changed it to
pawn Код:
format(pInfo[playerid][pRank],56,"New Member");
Thanks anyway, and I do understand what you mean.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)