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

it gives me error 047: array sizes do not match, or destination array is too small at lines:

Код:
	cmd = strtok(cmdtext, idx);


	tmp = strtok(cmdtext, idx);
and every line that looks like that, the error just appeared after i updated my pawno from r1 to r8. Please help.
Reply
#2

have you made cmd and tmp an array?
And BTW don't use strtok, it's an old methode from -2006 and it's slow and dificult.
Reply
#3

Quote:
Originally Posted by WackoX
Посмотреть сообщение
have you made cmd and tmp an array?
And BTW don't use strtok, it's an old methode from -2006 and it's slow and dificult.
and how to do it then? I didn't script for awhile so i'm a little behind.
Reply
#4

pawn Код:
new cmd[256], tmp[256];
Add this to your command.
Reply
#5

C++ is from 1983 and is still one of the fastest high level languages today. And processing code is super fast, If you panic about a milisecond or two, then you need to see someone.

matrixismyname, change the array size to 256 cells
Reply
#6

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
pawn Код:
new cmd[256], tmp[256];
Add this to your command.
That did the magic, thank you!
Reply
#7

No problem.
You always have to put "256" at your variable when you call the strtok function.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)