Little help please?
#1

It's late, I'm tired, this could be a real noob mistake.. but I'm not seeing it atm..

pawn Код:
for(new i = 0; i < 8; i++)
{
    if(Local[0] == Fastest[i]) ID[0] = i, printf("ID[0] set to %i", i);
    if(Local[1] == Fastest[i]) ID[1] = i, printf("ID[1] set to %i", i);
    if(Local[2] == Fastest[i]) ID[2] = i, printf("ID[2] set to %i", i);
    if(Local[3] == Fastest[i]) ID[3] = i, printf("ID[3] set to %i", i);
    if(Local[4] == Fastest[i]) ID[4] = i, printf("ID[4] set to %i", i);
    if(Local[5] == Fastest[i]) ID[5] = i, printf("ID[5] set to %i", i);
    if(Local[6] == Fastest[i]) ID[6] = i, printf("ID[6] set to %i", i);
    if(Local[7] == Fastest[i]) ID[7] = i, printf("ID[7] set to %i", i);

    if(ID[i] == 0) printf("ID[%i] matched to 0", i);
    if(ID[i] == 1) printf("ID[%i] matched to 1", i);
    if(ID[i] == 2) printf("ID[%i] matched to 2", i);
    if(ID[i] == 3) printf("ID[%i] matched to 3", i);
    if(ID[i] == 4) printf("ID[%i] matched to 4", i);
    if(ID[i] == 5) printf("ID[%i] matched to 5", i);
    if(ID[i] == 6) printf("ID[%i] matched to 6", i);
    if(ID[i] == 7) printf("ID[%i] matched to 7", i);
}
and

Код:
[00:59:49] ID[4] set to 0
[00:59:49] ID[3] set to 1
[00:59:49] ID[2] set to 2
[00:59:49] ID[1] set to 3
[00:59:49] ID[0] set to 4
[00:59:49] ID[5] set to 5
[00:59:49] ID[6] set to 6
[00:59:49] ID[7] set to 7

[00:59:49] ID[0] matched to 0
[00:59:49] ID[1] matched to 0
[00:59:49] ID[2] matched to 2
[00:59:49] ID[3] matched to 1
[00:59:49] ID[4] matched to 0
[00:59:49] ID[5] matched to 5
[00:59:49] ID[6] matched to 6
[00:59:49] ID[7] matched to 7
Code should be self explanatory?
EDIT: Yes I know I didnt use "else if" - its the same output with or without
Reply


Messages In This Thread
Little help please? - by iTorran - 04.05.2012, 23:56
Re: Little help please? - by zSuYaNw - 05.05.2012, 03:50
[No subject] - by iTorran - 05.05.2012, 13:51
Re: Little help please? - by Ballu Miaa - 05.05.2012, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)