SA-MP Forums Archive
[HELP] 5 error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] 5 error (/showthread.php?tid=204507)



[HELP] 5 error - buzifej - 29.12.2010

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

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


Re: [HELP] 5 error - _rAped - 29.12.2010

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


Re: [HELP] 5 error - buzifej - 30.12.2010

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


Re: [HELP] 5 error - _rAped - 30.12.2010

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


Re: [HELP] 5 error - buzifej - 30.12.2010

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);


Re: [HELP] 5 error - _rAped - 30.12.2010

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


Re: [HELP] 5 error - SkizzoTrick - 30.12.2010

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