SA-MP Forums Archive
array sizes do not match, or destination array is too small - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: array sizes do not match, or destination array is too small (/showthread.php?tid=426305)



array sizes do not match, or destination array is too small - Immortal_LTU - 28.03.2013

Quote:

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

Line:

Quote:

return result;

All script :

Quote:

strrest(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;
}




Re: array sizes do not match, or destination array is too small - Jeffry - 28.03.2013

Show the line(s)/variables where you use strrest.