Abundance of error 047
#1

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

Nearly every old script I've tried to convert I get a load of these followed with the strtok function already being defined.. very strange
Reply
#2

Paste Full Error... So i can help u...
Reply
#3

Quote:
Originally Posted by Bull_BoY
Посмотреть сообщение
Paste Full Error... So i can help u...
As it occurs an immense amount of times each time, here's an example:



(33327) : error 047: array sizes do not match, or destination array is too small
pawn Код:
new x_nr[32];
x_nr = strtok(cmdtext, idx);
Each time it seems it's setup just like this, using the strtok function, and the strings have to be re-assigned a value, I'm just wondering what caused this and/or how I should go about fixing it (if re-assigning values isn't the right way to go)

EDIT: I was able to fix this by increasing the size of each array (took forever), but I'm still curious as to why this has happened?
Reply
#4

pawn Код:
new x_nr[256];
That's not a SA-MP error, it's your fail.

strtok needs 256 cells.
Reply
#5

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
pawn Код:
new x_nr[256];
That's not a SA-MP error, it's your fail.

strtok needs 256 cells.
I changed all of them to 256, and it did indeed work, however my point was they had worked on 0.3b just as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)