Loop problem.
#1

Ok, I'm having a little trouble with this:
pawn Код:
stock GetFurnitureID(name[])
{
    for(new i = 1; i <= CountDynamicObjects(); i++)
    {
        if(strcmp(debugFurniture[objectsVariables[i][oFurnitureIDS]][dfName], name, true) == 0)
        {
            return i;
        }
    }
    return 0;
}
This code always returns 1, when I use any string there, even if it is correct or incorrect.. Why it won't return 0?

I also tried with the break method, still nothing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)