Server problem
#1

Ok so i had that gamemode from long ago and it was fine but today i edited some things and when i compile this pops up



:error 021: symbol already defined: "strtok"
: 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 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 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 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 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 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 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 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 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 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 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 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

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

Quote:

Originally Posted by pawn-lang.pdf
Error 047 - array sizes do not match, or destination array is too small:
For array assignment, the arrays on the left and the right side of the assignment operator must have the same number of dimensions.
In addition:
for multi-dimensional arrays, both arrays must have the same size;
for single arrays with a single dimension, the array on the left side of the assignment operator must have a size that is equal or bigger than the one on the right side.
When passing arrays to a function argument, these rules also hold for the array that is passed to the function (in the function call) versus the array declared in the function definition. When a function returns an array, all return statements must specify an array with the same size and dimensions.

-Your array size may be too small, also "strtok" Might be defined one time before?
Post your code or I cant really help
Reply
#3

Quote:
Originally Posted by prisonliferp
Посмотреть сообщение
-Your array size may be too small, also "strtok" Might be defined one time before?
Post your code or I cant really help
Код:
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;
Reply
#4

To be honest I have NO idea what the problem is here.. My strtok is 100% Matching with yours..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)