Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter NickJP

    (@nickjp)

    Here’s screenshot of the formula for calculating a players handicap depending on the number of frames they have won and lost:

    In the player metrics, a non-zero starting handicap for a player can be entered just as the digit and the formula works fine for calculating their handicap:

    For a player with a starting handicap of zero, if the value is entered just as 0, the handicap formula just outputs zero regardless of the values for Frames W and Frames L. If I surround the 0 with quotes then the formula works correctly.

    Thread Starter NickJP

    (@nickjp)

    Thanks. That fixed it.

    Thread Starter NickJP

    (@nickjp)

    Thanks. That was the problem. Now sorted.

    Thread Starter NickJP

    (@nickjp)

    If I put a check against that value in the player list (it’s actually under the metrics tab, not the performance tab), then the values for high break do appear when I click the “View all players” link. However, although I’ve specified that the player list should be sorted in descending order of high break, when all players are displayed the order shown seems completely random.

    Here is a screenshot of the player list showing the six players with the highest breaks, correctly sorted as specified: https://bsaact.org.au/wp-content/uploads/2024/10/topsix.jpg.

    And this is what appears when I click the “View all players” link. No sorting by high break: https://bsaact.org.au/wp-content/uploads/2024/10/all.jpg.

    Shouldn’t the player list still be sorted by the requested value when all players are shown?

    Thread Starter NickJP

    (@nickjp)

    When I publish an event list, the date and time formats shown to the end users are in the correct dd/mm/yyyy and 24-hour format that is configured in WordPress. It’s when I’m viewing events in Sportspress as the site admin while setting them up that the scheduled dates/times in the Date column are in the incorrect format.

    I can’t see how to upload a screenshot here, so I uploaded one to Google photos: https://photos.app.goo.gl/m1txBg3XWseXwdJ47. You can see that the dates and times are shown in yyyy/mm/dd and 12-hour format rather than dd/mm/yyyy and 24-hour format.

    NickJP

    (@nickjp)

    I had a similar problem, and found that it was due to caching by my hosting provider (Siteground). They provide a WordPress plugin called Speed Optimiser, and one of the caching options it provides is “memcaching” (caching of database queries). I found that if I had that enabled, then display of event results was inconsistent – sometimes the full results would display correctly, and sometimes not. As soon as I disabled memcaching, the results displayed correctly all the time.

    Thread Starter NickJP

    (@nickjp)

    Well, when I checked on the website this morning, the values in the player lists are now there correctly, though I hadn’t touched the website since I posted this query yesterday! Maybe there was some temporary problem with Siteground’s hosting that they fixed in the interim. I just entered another set of match results, and everything is functioning correctly, so problem solved.

    Thread Starter NickJP

    (@nickjp)

    p.s. I installed the Show Post Meta plugin, and with that I can see that the gamesw and gamesl values are being populated for each player in the event:

    4923 =>
    array (
    'gamesw' => '',
    'gamesl' => '2',
    'gamesd' => '',
    'frameswon' => '',
    'frameslost' => '',
    'framesdrawn' => '',
    'status' => 'lineup',
    'sub' => '0',
    ),
    616 =>
    array (
    'gamesw' => '',
    'gamesl' => '2',
    'gamesd' => '',
    'frameswon' => '',
    'frameslost' => '',
    'framesdrawn' => '',
    'status' => 'lineup',
    'sub' => '0',
    ),
    ),
    617 =>
    array (
    'gamesw' => '2',
    'gamesl' => '',
    'gamesd' => '',
    'frameswon' => '',
    'frameslost' => '',
    'framesdrawn' => '',
    'status' => 'lineup',
    'sub' => '0',
    ),
    620 =>
    array (
    'gamesw' => '2',
    'gamesl' => '',
    'gamesd' => '',
    'frameswon' => '',
    'frameslost' => '',
    'framesdrawn' => '',
    'status' => 'lineup',
    'sub' => '0',
    ),

    And in the player list gamesw and gamesl are two of the columns:

    [player_list id=”11966″ title=”Player Stats” number=”all” team=”0″ seasons=”88″ leagues=”10″ columns=”currenttgt,gamesw,gamesl,gameperc” orderby=”gameperc” order=”DESC” show_all_players_link=”0″ align=”none”]

    But those two values are showing up as zero in the player list.

    Thread Starter NickJP

    (@nickjp)

    Thanks, setting up a new stat like that enables the player list to be correctly sorted.

    Thread Starter NickJP

    (@nickjp)

    Yes, that was the Sportspress setting I changed to get rid of the error. I have the value set to 0 minutes.

    Thread Starter NickJP

    (@nickjp)

    Same error has just appeared again. I updated more events with their results, and I get the same non-numeric value warning unless I enter a value of zero in the Full Time field. This problem did not happen when entering event results with the previous version of Sportspress.

    Thread Starter NickJP

    (@nickjp)

    OK, I have found the cause of the problem. When I view an event, there is a field under Details named Full Time, given in minutes. In the five or so years that I have been using Sportspress, I’ve never bothered to populate this field when importing events, as it’s irrelevant to our competitions, which are played to a target and not a time, and this has not caused a problem until the latest version of Sportspress. Now, as soon as I enter the results for an event that has been completed, I have to put a value in this field, which shows as blank (I just put 0) or I get the non-numeric value warning.

    When I view older events for which results were entered using an older version of Sportspress, this Full Time field has been automatically populated with a value of zero, whereas the new version leaves it blank and generates the warning. Why the change in behaviour?

    Thread Starter NickJP

    (@nickjp)

    Well, this is interesting. We have events in the current season for two separate competitions, billiards and snooker. I was previously seeing the error only on the page containing the league table for the snooker competition, and only that competition had events where I had entered results since the upgrade to Sportspress 2.7.16.

    However, I just entered results for two billiards events by editing the existing events (just entering points scored, no times entered at all), and after updating those events, I am now seeing the identical error on the page containing the billiards league table (https://bsaact.org.au/billiards-2/).

    So something with the new version is causing the problem to appear when an event is edited to enter the points scored.

    Thread Starter NickJP

    (@nickjp)

    I’ve checked, and I cannot find such a non-numeric time value anywhere. The only times in the database are those that were imported when I created all the season’s events a couple of months ago via import of CSV files. I’ve checked the CSV files, there are no non-numeric values in the time fields, and when I check all the season’s events in Sportspress, they all have a valid time field with no non-numeric values shown. It seems to me very coincidental that the events were all created a couple of months ago, with no warnings seen, and this warning has suddenly appeared immediately after a version upgrade of Sportspress.

    Thread Starter NickJP

    (@nickjp)

    Thanks, I’ve spent a while playing around with it, but can’t get it to work. I created a variable currenthcp in the hope that it would get populated with the result of my existing CurrentHcp = StartingHcp + (10 * (GamesWon – GamesLost)) equation, and then used currenthcp in your suggested equation. But it looks as though the currenthcp variable doesn’t get populated from the equation, as using it doesn’t give a valid result.

    Is it possible to use the output of one equation in another without reproducing the entirety of the first equation everywhere that its output value appears in the second?

    Also, is it possible to define additional constants beyond the default available values of 0-10 and 100? At the moment I’m using (7*10) for 70 and (8*4*10) for 320.

Viewing 15 replies - 1 through 15 (of 16 total)