Author Topic: Points not calculating - Solution Found  (Read 2233 times)

Wick

  • Newbie
  • *
  • Posts: 36
    • View Profile
Points not calculating - Solution Found
« on: November 16, 2011, 08:57:30 AM »
Ok I DL version 3 to another PC to take a look at it, restored a backup from the PC that I run my league on and the points are not calculating.

Here is the formula i use: if(inLeague = 1,sqrt(nm*bc)/(leagueRank + 1),0)

I click on the test formula button then set from tourament button for both the tourament info and player info the only info missing is the leaguerank and inleague from the player info. I have checked to make sure the player is still listed in the league.

Any ideas?
« Last Edit: November 16, 2011, 11:07:55 AM by Wick »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points not calculating
« Reply #1 on: November 16, 2011, 09:00:21 AM »
If you're *testing* the formula (using the Test Formula dialog), set inLeague to 1 yourself.  The formula's going to always return 0 unless inLeague is set to 1.

Wick

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Points not calculating
« Reply #2 on: November 16, 2011, 09:07:02 AM »
I am loading a perviously completed tourament, and there are not points showing on the players tab. It reflects everyone who was in the tourament and thier rank, but no points. That why i was using the test formula button with the set from tourament option. I assumed it would pull from the currently loaded tourament. When I set the inleage and leaguerank to the correct values the formula works, but no points are being calculated on the players tab.  ???


Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points not calculating
« Reply #3 on: November 16, 2011, 10:24:18 AM »
Is the League set properly on the Game tab?

Wick

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Points not calculating
« Reply #4 on: November 16, 2011, 10:26:30 AM »
Yes

Wick

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Points not calculating
« Reply #5 on: November 16, 2011, 10:28:05 AM »
going to try and re-restore the back up and see what happens. When I load this game from the other PC (the "production" pc) it works fine.

Wick

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Points not calculating
« Reply #6 on: November 16, 2011, 10:49:44 AM »
No luck. Everything looks like it is set correctly. I am sure it is something simple that I am missing.

Wick

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Points not calculating
« Reply #7 on: November 16, 2011, 11:07:22 AM »
Ok changed the formula with the following results.

n - r + 1   points calculated

sqrt(n*bc)/(r + 1)  points calculated

sqrt(nm*bc)/(r + 1)  no points calculated

sqrt(numberOfLeagueMembers*bc)/(r + 1) points calculated

sqrt(numberOfLeagueMembers*bc)/(leagueRank + 1)  points calculated

if(inLeague = 1,sqrt(numberOfLeagueMembers*bc)/(leagueRank + 1),0)  points calculated

So it looks like it is the nm that is causing the issue.

Wick

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points not calculating - Solution Found
« Reply #8 on: November 16, 2011, 12:11:09 PM »
Great work!  Very systematic.  Yes, it looks like the "nm" alias was not properly set.  Luckily you can work around this by using the full name of the variable.

Wick

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Points not calculating - Solution Found
« Reply #9 on: November 20, 2011, 05:34:40 PM »
Corey I meant to ask you you have a formal bug reporting process, or will this post suffice?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points not calculating - Solution Found
« Reply #10 on: November 20, 2011, 08:38:34 PM »
This is the process.  Or one of them, at least.  :)