I just make this to ask makslane a litle problem I got with "if"s (yea, again...)
I know I had the same trouble maybe 5 posts ago, but I'm sure makslane will find the problem, if is the codes, my computer, or... a GE glitch.
if (a == 1)
{
} else if (a == 2)
{
} else if (a == 3)
{
} else if ( )
... on and on
switch (a)
{
case 1:
// do something
break; // stop here for case 1
case 2:
// do something else
break; // stop here for case 2
case 3:
// do something for case 3
break; // stop case 3
case .... on and on
}
if (a == 1)
{
// do a == 1 stuff
} else if (a == 2)
{
// do a == 2 stuff
} else if (a == 3)
{
// a == 3
}
// etc
if (a == 1)
{
// a == 1
}
else
{
// a != 1
if (a == 2)
{
// a == 2
}
else
{
// a != 1 and a != 2
if (a == 3)
{
// a== 3
}
else
{
// a != 1 and a != 2 and a != 3
}
}
}
Users browsing this forum: No registered users and 1 guest