[HELP] 5 error
#1

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

This is error line:
TopLappers[j]=strtok(templine,i);
Reply
#2

You need to add more cells, where you defined the variable.
Reply
#3

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
Reply
#4

Did you actually manage to fuck up strtok()? I guess
pawn Код:
new result[20];
is too small then.
Reply
#5

C:\DOCUME~1\BOCSBE~1\Asztal\dd.pwn(10530) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\BOCSBE~1\Asztal\dd.pwn(10540) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\BOCSBE~1\Asztal\dd.pwn(10663) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\BOCSBE~1\Asztal\dd.pwn(10683) : error 047: array sizes do not match, or destination array is too small error 047: array sizes do not match, or destination array is too small


Error:
TopLappers[j]=strtok(templine,i);
Reply
#6

Wherever this: TopLappers[] is created you need to make it larger give it more cells.
Reply
#7

Raise all your strings,you have there 5 strings that need t obe raised
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)