Loop & Case (doesn't work properly)
#2

pawn Код:
if(eCheckpoints[0] <= checkpointid <= eCheckpoints[sizeof(eCheckpoints)-1])
{
    new CP = checkpointid - eCheckpoints[0];
    switch(CP)
    {
        case 0:
        case 1:
        ...
    }
}
or

pawn Код:
for(new o = 0; o < sizeof(eCheckpoints); o++)
{
    if(checkpointid == eCheckpoints[o])
    {
        switch(o)
        {
            case 0:
            ...
        }
        break;
    }
}
Reply


Messages In This Thread
Loop & Case (doesn't work properly) - by Patrick - 05.10.2013, 23:00
Re: Loop & Case (doesn't work properly) - by Jefff - 05.10.2013, 23:11

Forum Jump:


Users browsing this thread: 1 Guest(s)