../include/gl_common.inc
#1

I keep getting this when i compile.
i am trying to add The Cars On to my server

Код:
../include/gl_common.inc(80) : error 021: symbol already defined: "strtok"
../include/gl_common.inc(139) : error 021: symbol already defined: "isNumeric"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
//----------------------------------------------------------

stock strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	} //--Line 80

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

//------------------------------------------------
Код:
//----------------------------------------------------------

stock isNumeric(const string[])
{
  new length=strlen(string);
  if (length==0) return false;
  for (new i = 0; i < length; i++)
    {
      if ( //--Line 139
            (string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+') // Not a number,'+' or '-'
             || (string[i]=='-' && i!=0)                                             // A '-' but not at first.
             || (string[i]=='+' && i!=0)                                             // A '+' but not at first.
         ) return false;
    }
  if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
  return true;
}

//----------------------------------------------------------
I Hope you can help with the details I've Given
Reply


Messages In This Thread
../include/gl_common.inc - by ShaneOvSina - 22.04.2013, 02:41
Re: ../include/gl_common.inc - by Faisal_khan - 22.04.2013, 05:06
Re: ../include/gl_common.inc - by ShaneOvSina - 22.04.2013, 07:22
Re: ../include/gl_common.inc - by Lordzy - 22.04.2013, 08:20
Re: ../include/gl_common.inc - by Faisal_khan - 22.04.2013, 08:20

Forum Jump:


Users browsing this thread: 2 Guest(s)