ProQuest Pro Giving Error When I Try and Add to the Score

The only thing I can think of is that $quest_id is not actually 1 at the time the scene is accessed. This calls check_complete on a quest you have not created goals for yet. Therefore, when doing the various @goal_min[id]>=@goal_max[id] checks, you're trying to compare nil >= nil, which then causes the error. You need to first check that the goals have been implemented before doing the comparisons, i.e.
Code:
!@goal_min[id].nil? && !@goal_max[id].nil?
All right, so where would I do that? In the script or in one of my events?
In the check_complete method of the script.
That seems to have worked, actually. I'm hesitant to ask the thread to be closed in case anything else pops up, however.
OK, so now we're getting another problem. You can complete the quest an infinite number of times. I'm assuming there's a boolean that needs to be activated somewhere in the code, but I don't know where.
Are you talking about when you call do_complete?
Code:
  def do_complete(id)
    if check_complete(id) && @quest_complete[id] != true
      @number_complete+=1
      @qp+=@quest_rating[id]
      @quest_complete[id]=true
    end
  end
Because it looks like it already checks if the quest has been marked completed already.
I don't exactly know where it is, LOL. I just know that you can just keep pressing complete infinitely.
What does your event completion look like then
Heyla! I'm Hex's partner in the game in question. Here's what the problem looks like:

It starts out normal. You can complete the event:

1611944097639.png


You get the congratulatory screen:

1611944136059.png


And then it takes you back to the main menu:

1611944174571.png


But when you go back to the quest menu....

1611944244370.png


That screen is back, letting you complete the quest an infinite number of times. We're not sure why. It's completing. You're getting the gold and the xp. But it keeps wanting to take the quest menu back to the completion screen, for some strange reason.

I hope this clarifies our problem?

We don't know enough about scripts to be able to know what the actual problem is.
I find it weird that you're asking about this and not "how come I can only view one quest and not any of the others from the menu".

How are you putting the Quests option into your custom menu? From the script, it does this with the default menu:
Code:
class Scene_Menu < Scene_MenuBase
  alias quest_create_command_window create_command_window
  def create_command_window
    quest_create_command_window
    @command_window.set_handler(:quests, method(:quests))
  end
 
  def quests
    $menu=1
    $mode=1
    $quest_id=0
    SceneManager.call(Scene_Quest)
  end
end
Notice the three global variables being assigned before the call to Scene_Quest? I believe you forgot to do that with your menu.

The problem you are describing can only be performed if you go to Scene_Quest from a script call, like when you talk to the event to turn in your rewards. That's on you to make sure the player never encounters that, either through the usage of switches and/or conditional branch script calls.

With that said, this is perhaps one of the most eye-bleeding scripts I've seen in some time. This could use a ton of TLC; you can tell the author barely has an understanding of scripting.
I find it weird that you're asking about this and not "how come I can only view one quest and not any of the others from the menu".

How are you putting the Quests option into your custom menu? From the script, it does this with the default menu:
Code:
class Scene_Menu < Scene_MenuBase
  alias quest_create_command_window create_command_window
  def create_command_window
    quest_create_command_window
    @command_window.set_handler(:quests, method(:quests))
  end

  def quests
    $menu=1
    $mode=1
    $quest_id=0
    SceneManager.call(Scene_Quest)
  end
end
Notice the three global variables being assigned before the call to Scene_Quest? I believe you forgot to do that with your menu.

The problem you are describing can only be performed if you go to Scene_Quest from a script call, like when you talk to the event to turn in your rewards. That's on you to make sure the player never encounters that, either through the usage of switches and/or conditional branch script calls.

With that said, this is perhaps one of the most eye-bleeding scripts I've seen in some time. This could use a ton of TLC; you can tell the author barely has an understanding of scripting.
That's because we've only tested with one quest, so far. We haven't put in more than one quest in the game, as of yet. As you said, we called the menu through that script call. Are we not supposed to do it that way? If not, how do we call the quest log?

1612110268077.png


I'll be honest and say that these questions are mostly academic, at this point, as we had moved on to a different quest script that seems to work just as well as, if not better than, this one (Vlue's Basic Quest Script). I'm still curious as to what would have solved the problem.

Thank you, very much, for all your help!
Oh your menu is evented. Anyways in your screenshot, you just had to update the script call to
Code:
    $menu=1
    $mode=1
    $quest_id=0
    SceneManager.call(Scene_Quest)
But using a different, more user friendly quest system is honestly the best choice, considering I saw your youtube comment was a year ago and you're still struggling with this.
Yeah, I tried implementing your suggestion, and came up with another problem. xD Yeah. I think I'm done with this script. lol!

Original thread: https://forums.rpgmakerweb.com/threads/proquest-pro-giving-error-when-i-try-and-add-to-the-score.132644/