Two Scripts returning Error

GreyStone84

Sic Gorgiamus Allos Subjectatus Nunc
Veteran
Joined
Jun 24, 2015
Messages
295
Reaction score
95
First Language
English
Primarily Uses
RMVXA
I'm using a few scripts together, but the two in question seem to be Modern Algebra's Quest Journal and PAC Main Menu Ace. I had everything working together well until I added the Quest Journal. Game starts up fine but when I open the menu, I get this error:


Script 'PAC Menu' line 337: NoMethodError occurred. undefined method '[]' for nil:NilClass


If it helps, this is line 337 of the PAC Menu script: 


if PAC::MM::Icons && PAC::MM::COMMANDS[index][2] != nil


Has anyone else ran into this problem or know how to fix it? Thanks in advance for any help.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


The script forum itself is for presenting scripts you wrote yourself


Please link to the scripts you're using, we can't help without knowing the scripts.


That said, it's easy to break the engine by coding mistakes done when you enter the quests into MA's Quest journal.


To really localise the problem, we will probably need the backtrace of that error - I suggest you follow the link "how to use a script" in my signature to the bughunting and provide us a screenshot of the console output of the backtracer script.
 

GreyStone84

Sic Gorgiamus Allos Subjectatus Nunc
Veteran
Joined
Jun 24, 2015
Messages
295
Reaction score
95
First Language
English
Primarily Uses
RMVXA
Please link to the scripts you're using, we can't help without knowing the scripts.


That said, it's easy to break the engine by coding mistakes done when you enter the quests into MA's Quest journal.


Sorry about that, thought I was in the right forum. Anyways, here are the links to all the scripts I am currently using:




And about entering code into MA's Quest Journal, I have not yet entered OR altered anything in the Quest Journal. I simply put the script in my game and tried to see if it works. I'm guessing the problem comes from trying to make the Menu Command called "Quest" in my menu list because of this bit of script:


#  MENU_ACCESS - If true, you can access the quest journal through a command 
  # in the menu. If false, there will be no such command.
  MENU_ACCESS = true  <--- I switched this to false and I was able to access my menu without a problem but then I don't have "Quest" in my menu list.
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
383
Reaction score
91
First Language
English
Primarily Uses
When you set MENU_ACCESS to true, it causes MA's quest journal to overwrite some code related to the menu which PAC's Main Menu script is also changing. You can try swapping the order of the scripts around, i.e. put one above the other in the script editor, and see if that fixes it (I'm guessing it won't but you never know til you try).


The fix you'll likely end up needing is to set MENU_ACCESS to false, and then configure PAC's Main Menu to call MA's quest journal, which - based on a cursory glance at the script - it can totally do. 


EDIT: Yea, so if you add something like:


['Quest',
    'command_personal',
    121,
    'main_commands_enabled',
    'SceneManager.call(Scene_Quest)'],


to the COMMANDS section of PAC's script, then you should be able to call the Quest Journal from the menu.
 
Last edited by a moderator:

GreyStone84

Sic Gorgiamus Allos Subjectatus Nunc
Veteran
Joined
Jun 24, 2015
Messages
295
Reaction score
95
First Language
English
Primarily Uses
RMVXA
EDIT: Yea, so if you add something like:


['Quest',
    'command_personal',
    121,
    'main_commands_enabled',
    'SceneManager.call(Scene_Quest)'],
I actually just figured the whole thing out for myself and was coming here to close this out, but yes, you are right but I needed to do both!


The snippet of code you supplied I kind of already knew because I added in another script this way to PAC, the problem was I at first couldn't find the right method to call in the script, then I didn't have the Quest Log above PAC in the script list. After that, the 'command_personal' makes it switch to the actor select side of the Menu screen and you have to click on an actor to activate the Quest Log which I thought is obviously stupid. Anyways, I added in a 'command_quest' into the Script_Menu and now I can call it like normal.


Thanks for checking into it anyways Mobius, I'll still mark it as you solved it :D  Cheers!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top