faster way?
#1

is there a faster way to do this?

pawn Код:
switch(Items)
{
    case 0..30: Itemselect = 1;
    case 30..60: Itemselect = 2;
    case 60..90: Itemselect = 3;
    .......
    case 2970..3000: Itemselect = 100;
}
Reply
#2

Depends on really exactly what you're trying to do.
Reply
#3

pawn Код:
Itemselect = Items/30;
If both are integers, this will work.


PS: Your first case goes from 0..29 then 30..59 (...) then 2970...2999. Else you will have double case errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)