how to fix this error
#7

No offence, but is that hard to ****** the errors/warnings? I can find dozen of results..

pawn Код:
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;
}
When you create an array, let me give an example:
pawn Код:
new
    TopLappers[ MAX_PLAYERS ]
;
if(TopLappers == 5) //error 033: array must be indexed (variable "TopLappers")
About "loose indentation". Just indent your code..

pawn Код:
// Awful indentation
if(x == n)
{
  x = 5;
 n = 6;
  }
pawn Код:
// Readable and good! No warnings!
if(x == n)
{
    x = 5;
    n = 6;
}
Reply


Messages In This Thread
how to fix this error - by baseman131 - 15.07.2013, 09:56
Re: how to fix this error - by Necip - 15.07.2013, 09:57
Re: how to fix this error - by NotePadGaming - 15.07.2013, 10:02
Re: how to fix this error - by baseman131 - 15.07.2013, 10:09
Re: how to fix this error - by NotePadGaming - 15.07.2013, 10:15
Re: how to fix this error - by baseman131 - 15.07.2013, 10:21
Re: how to fix this error - by Konstantinos - 15.07.2013, 10:24
Re: how to fix this error - by baseman131 - 15.07.2013, 10:30
Re: how to fix this error - by baseman131 - 15.07.2013, 11:12

Forum Jump:


Users browsing this thread: 1 Guest(s)