Author Topic: Formula returning error  (Read 563 times)

foxlollato

  • Newbie
  • *
  • Posts: 1
    • View Profile
Formula returning error
« on: July 01, 2013, 11:34:24 PM »
Hiho. i wonder to give player points this way.

1 - 100
2 - 85
3 - 75
4 - 70
5 - 65
6 - 60
7 - 55
8 - 50
9 - 45
10 - 40
11 - 10
12 - 10
13 - 10
14 - 10
and 10 points to rest.
imusing this formula

if(rank<=10, switch(count(rank), 1, 100, 2, 85, 3, 75, 4, 70, 5, 65, 6, 60, 7, 55, 8, 50, 9, 45, 10, 40),10)

but it gives 100 points to 10 first players and 10 to the rest.
could anyone helpme??

Thanks !

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Formula returning error
« Reply #1 on: July 01, 2013, 11:38:39 PM »
You've made it much more complicated than it needs to be. For using a simple switch, it should be switch(r, 1, 90, 2, 75, 3, 65, 4, 60, 5, 55, 6, 50, 7, 45, 8, 40, 9, 35) + 10.

This looks different, but this is right: the "+ 10" gives everyone 10 points. Top ten get the remainder of the points as you show it.
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!