Wow?26 errors in one command?
#2

The error
Quote:

error 079: inconsistent return types (array & non-array)

usually tells you that you have a function or callback which returns arrays or non-arrays in different cases.

Example:
pawn Код:
myFunc()
{
    new
        i[] = "test",
        j = random( 5 );
    if( j < 3 )
        return j;
    else
        return i;
}
This would either return j, which is an integer, or i, which is a string (which technically is an array).

However, 26 errors is just the maximum amounts of errors the compiler will show you. You can have a lot more than only 26. This is most often caused by a missing closing brace somewhere.

Make sure to indent your code to find missing braces.
Reply


Messages In This Thread
Wow?26 errors in one command? - by geohareas - 16.01.2013, 10:46
Re: Wow?26 errors in one command? - by LarzI - 16.01.2013, 11:13
Re: Wow?26 errors in one command? - by RajatPawar - 16.01.2013, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)