Yup, another "tag mismatch" thread.
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
That's not it at all! You can't use a string to index an array. The problem is probably with the declaration of "GC", which you didn't post.
You're right, here's my code:

pawn Код:
enum geos
{
    easy1,
    easy2,
    easy3,
    med1,
    med2,
    med3,
    hard1,
    hard2,
    hard3,
    exp1
}
new GC[MAX_PLAYERS][geos];

stock GetGeoString(playerid, variable[])
{
    new str[12];
    if(GC[playerid][variable] == 1){str = "FOUND!";}
    else {str = "Not Found";}
    return str;
}
And the output errors:

Код:
C:\Users\Aerotactics\Desktop\SAMP testing\filterscripts\geo.pwn(58) : error 035: argument type mismatch (argument 2)
C:\Users\Aerotactics\Desktop\SAMP testing\filterscripts\geo.pwn(66) : error 033: array must be indexed (variable "variable")
What I'm trying to do is what it looks like, simply getting a string based on a variable. That variable is in an enumerator, however. By creating a stock, I was intending on making the script more efficient.
Reply


Messages In This Thread
Yup, another "tag mismatch" thread. - by Aerotactics - 05.06.2014, 05:42
Re: Yup, another "tag mismatch" thread. - by BroZeus - 05.06.2014, 05:50
Re: Yup, another "tag mismatch" thread. - by Aerotactics - 05.06.2014, 06:15
Re: Yup, another "tag mismatch" thread. - by Aerotactics - 05.06.2014, 09:35
Re: Yup, another "tag mismatch" thread. - by Aerotactics - 05.06.2014, 11:03
Re: Yup, another "tag mismatch" thread. - by s0nic - 05.06.2014, 21:20
Re: Yup, another "tag mismatch" thread. - by Aerotactics - 06.06.2014, 02:27

Forum Jump:


Users browsing this thread: 1 Guest(s)