new rand = random(5);
switch(rand)
{
case 0:
{
new rand = random(5);
{
and there others random
}
}
case 1:
{
new rand = random(5);
{
and there others random
}
}
case 2:
{
new rand = random(5);
{
and there others random
}
}
case 3:
{
new rand = random(5);
{
and there others random
}
}
case 4:
{
new rand = random(5);
{
and there others random
}
}
new rand = random(5);
switch(rand)
{
case 0:
{
}
case 1:
{
}
case 2:
{
}
case 3:
{
}
case 4:
{
}
}
No need to initialize random values within each case. Also the brackets are useless there.
pawn Code:
|
new rand = random(5); { and there others random }
new rand1 = random(5); new rand2 = random(5); switch(rand1) ...