fk: SWITCH-Kontrolle

Beitrag lesen

Sinngemäß so:

switch (true){
  case $charexp<100   :$lvlup2=1   ;break;
  case $charexp<500   :$lvlup2=2   ;break;
  case $charexp<1000  :$lvlup2=3   ;break;
  case $charexp<1500  :$lvlup2=4   ;break;
  case $charexp<2000  :$lvlup2=5   ;break;
  case $charexp<2500  :$lvlup2=6   ;break;
  case $charexp<3000  :$lvlup2=7   ;break;
  case $charexp<3500  :$lvlup2=8   ;break;
  case $charexp<4000  :$lvlup2=9   ;break;
  case $charexp<4500  :$lvlup2=10  ;break;
 }