1. Ivan Andrus
  2. emacs-achievements
Issue #1 resolved

"Wrong type argument: number-or-marker-p, nil" when updating score

Anonymous created an issue

When I run achievements-list-achievements, I get the "wrong type argument" error. Running edebug on the source, it appears to be happening during achievements-update-score, specifically when processing "Free Software Zealot" achievement. Specifically, it happens when running (emacs-achivement-predicate) on that achievement. When I look at the definition of that achievement, there is no :predicate key. Perhaps that is the issue?

Comments (3)

  1. Jonathan Arkell

    Simple fix.

    The default case of the cond statement of achievements-num-times-commands-were-run should return 0 and not nil I believe. Changing that seems to fix everything just right.

    Here is a diff:

    --- 105,111 ----
                       if (member (car com) command-list)
                       do (setq total (+ total (cdr com))))
                 total))
    ---         (t nil)))
    +++         (t 0)))
      
      (defun achievements-command-was-run (command)
        "Return non-nil if COMMAND has been run.
    
  2. Log in to comment