array sizes do not match, or destination array is too small
#1

I am getting this error but I dont know why, any ideas?
Reply
#2

Quote:
Originally Posted by OleKristian95
View Post
I am getting this error but I dont know why, any ideas?
Post the Lines.
Reply
#3

Quote:
Originally Posted by .FuneraL.
View Post
Post the Lines.
Here's some.
9370
pawn Code:
TBuilder=strtok(templine,idx); // read off RACEBUILDER
9380
pawn Code:
TempLapper=strtok(templine,idx);
10684
pawn Code:
new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
10745
pawn Code:
new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
Reply
#4

sorry for useless post but can u use [PAWN] tags?
Reply
#5

strtok original code new result[20]; <-- 20 cell
new tmp[128], tmp2[128], <-- 128 cell

array size do not match tmp(128 cell) not equal result (20 cell)

Use strrest in gl_common.inc.

pawn Code:
#include "../include/gl_common.inc"

//...

new tmp[128], tmp2[128], Index; tmp = strrest(params,Index), tmp2 = strrest(params,Index);
Reply
#6

Quote:
Originally Posted by smeti
View Post
strtok original code new result[20]; <-- 20 cell
new tmp[128], tmp2[128], <-- 128 cell

array size do not match tmp(128 cell) not equal result (20 cell)

Use strrest in gl_common.inc.

pawn Code:
#include "../include/gl_common.inc"

//...

new tmp[128], tmp2[128], Index; tmp = strrest(params,Index), tmp2 = strrest(params,Index);
I don't understand :S
Reply
#7

Pretty sure strtok returns only 256 size strings. Yet another reason why you should abolish this method ASAP.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)