13.04.2014, 18:52
I use strrest:
In my line:
result = strrest(cmdtext, idx);
I have this error:
error 047: array sizes do not match, or destination array is too small
pawn Код:
stock strrest(const stringstrrest[], &index)
{
new length = strlen(stringstrrest);
while ((index < length) && (stringstrrest[index] <= ' '))
{
index++;
}
new offset = index;
new result[128];
while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = stringstrrest[index];
index++;
}
result[index - offset] = EOS;
return result;
}
result = strrest(cmdtext, idx);
I have this error:
error 047: array sizes do not match, or destination array is too small