Multiplication warnings
#2

pawn Код:
new stolenMoney = 1, robChance = random(5);
switch(robChance) {
    case    0: stolenMoney = 0;
    case 1..4: {
        stolenMoney = stolenMoney * 1000 * robChance;
    }
}
But this should do the same, as the complete code above.
pawn Код:
new stolenMoney = 1000 * random(5);
Reply


Messages In This Thread
Multiplication warnings - by jameskmonger - 26.07.2012, 19:45
Re: Multiplication warnings - by Jeffry - 26.07.2012, 19:49
Re: Multiplication warnings - by jameskmonger - 26.07.2012, 20:05

Forum Jump:


Users browsing this thread: 2 Guest(s)