Problem with this loop
#1

Hey, I just made a function to return a gang id from a name:

pawn Код:
stock GetGangID(name[])
{

    for(new i; i < MAX_GANGS; i++)
    {
        if( name != GangInfo[i][GangName]) continue;

    }
    return name;
}
except I get the error:
Код:
error 033: array must be indexed (variable "name")
and when i use the function I get:
Код:
error 033: array must be indexed (variable "GetGangID")
Can somebody help me out?
Reply
#2

stock GetGangID(name)
{

for(new i; i < MAX_GANGS; i++)
{
use strcmp here
}
return name;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)