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

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
347
Reaction score
131
First Language
English
Primarily Uses
RMXP
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?
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,910
Reaction score
3,394
First Language
English
Primarily Uses
RMVXA
All right, so where would I do that? In the script or in one of my events?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
347
Reaction score
131
First Language
English
Primarily Uses
RMXP
In the check_complete method of the script.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,910
Reaction score
3,394
First Language
English
Primarily Uses
RMVXA
That seems to have worked, actually. I'm hesitant to ask the thread to be closed in case anything else pops up, however.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,910
Reaction score
3,394
First Language
English
Primarily Uses
RMVXA
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.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
347
Reaction score
131
First Language
English
Primarily Uses
RMXP
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.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,910
Reaction score
3,394
First Language
English
Primarily Uses
RMVXA
I don't exactly know where it is, LOL. I just know that you can just keep pressing complete infinitely.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
347
Reaction score
131
First Language
English
Primarily Uses
RMXP
What does your event completion look like then
 

TheKeeper

Veteran
Veteran
Joined
Dec 23, 2016
Messages
115
Reaction score
29
First Language
English
Primarily Uses
RMVXA
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.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
347
Reaction score
131
First Language
English
Primarily Uses
RMXP
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.
 

TheKeeper

Veteran
Veteran
Joined
Dec 23, 2016
Messages
115
Reaction score
29
First Language
English
Primarily Uses
RMVXA
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!
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
347
Reaction score
131
First Language
English
Primarily Uses
RMXP
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.
 

TheKeeper

Veteran
Veteran
Joined
Dec 23, 2016
Messages
115
Reaction score
29
First Language
English
Primarily Uses
RMVXA
Yeah, I tried implementing your suggestion, and came up with another problem. xD Yeah. I think I'm done with this script. lol!
 

Latest Threads

Latest Posts

Latest Profile Posts

@Shaz needs to make a website for his plugins. (it can be done easily for free with google sites.) I can't find a database of them anywhere!
Dion2.jpg

testing #2
Got fired from my job because they found someone more "Professional" and "Better" then me so I had more time to work on a tower defense prototype for a friend, I will upload tutorials on how to make it yourself once it's finished.
Added a modern day fridge sprite to my thread. Empty, full, and rotten versions :) enjoy

Forum statistics

Threads
109,126
Messages
1,042,349
Members
141,624
Latest member
fmoviesfmovies12
Top