Effectus:Undefined method 'collect' for Nil:NilClass

Brigg

Veteran
Veteran
Joined
Apr 22, 2015
Messages
129
Reaction score
4
First Language
English
Primarily Uses
This is happening in my Effectus script. I realize Effectus is a plug & play outside of RPG Maker, however, the people at Effectus (Source) have been MIA for about a year now, so I'm desparate and come to you all for help. It's been a rough night.

The script line in question is the uploaded image.

The crash happens when I go to Save the game, I get a Buzzer sound effect preventing me from saving - but only after I run a specific event. The event itself is only using and comparing variables. The game then crashes taking my previously saved file with it. Luckily, I had multiple saved files up to this point, or I would have lost all progress.

@Shaz, you've created some compatibility updates in the past for Effectus. Any chance you've seen this before?

Hoping for some insight.
Thanks all!
 

Attachments

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,865
Reaction score
11,071
First Language
English
Primarily Uses
RMVXA
[move]RGSSx Script Support[/move]

EDIT
Can we have a screenshot of that event, all pages, not cropped. I think it is at least possible that something is happening there, as I've used Effectus for a completed game and my current project, also using it, has about 6 hours of game play already, and I've never had that crash.

Are you using a script which modifies the Save function or menu? In particular, are you using any sort of Autosave script?
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
First Language
English
Primarily Uses
RMMV
Have I? I don't recall making compatibility updates for it - I generally try to avoid it.

Getting a buzzer when you try to save is typical of an event being linked to a sprite in an out-of-the-ordinary way. I think one of the most common causes is having a parallel process event that repeatedly shows a balloon icon over itself or another event. See if you've got any of those.

Those few lines of script are meaningless. It indicates that the @ms_effectus_etile_pos element does not exist. But you haven't given enough information to know what class that belongs to or what is trying to call it. Provide a link to the script so we can see the whole thing (an actual link to the web page or forum post is best - definitely don't copy and paste the script itself here).
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,865
Reaction score
11,071
First Language
English
Primarily Uses
RMVXA
@Shaz sadly no link can be provided, as it's a commercial script and there is no access to it except by paying.

The patches that he is referring to may possibly be the ones that Source actually did to make Effectus compatible with your mouse script.

Like you, I think the cause is an event, not the script itself.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
First Language
English
Primarily Uses
RMMV
actually that looks like an override to the Game_Map method. And that's only called by the passability check - unless Effectus uses it for something else.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,865
Reaction score
11,071
First Language
English
Primarily Uses
RMVXA
@Shaz That line is in a tiny section just called "All tiles". It is immediately followed by a section "Alias Passable?" then another called "Passable?", so it does indeed look like a passability check - nothing to do with saving.
 

Brigg

Veteran
Veteran
Joined
Apr 22, 2015
Messages
129
Reaction score
4
First Language
English
Primarily Uses
I'm using Yanfly's Ace Save Engine for the Autosave. The autosave doesn't work. It's probably conflicting with another script, however I like the Save/Load screen, so I've kept it, and haven't messed with why it isn't functioning yet.

As for the event, it's very long, and it only deals with text boxes and variable checks. No sprite movements, checks, or changes. However, when the event starts, it does use 1 Show Picture and 1 Erase Picture when the event is over.

The Ace Save Engine uses variables 101-103, but I avoided using them, and from what I can tell, those variables are always at 0.
No parallel balloon animations either.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
First Language
English
Primarily Uses
RMMV
What I do in these cases to determine exactly what the problem is, is remove the error handling around the save function. It will then (IIRC) give you a different error. I also start outputting stuff to the console to see exactly what it is that's getting saved - if there's a sprite in there, that'll be it.

It's just a weird error, and a strange line for it to happen on, as that line has nothing to do with save data. I'm thinking you've either got two issues here and they just happen to occur around the same time, or something is happening when trying to save data that sets things up for the next error.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,865
Reaction score
11,071
First Language
English
Primarily Uses
RMVXA
I have a small compatability patch for Yanfly written by Source. Do you have it?
 

Brigg

Veteran
Veteran
Joined
Apr 22, 2015
Messages
129
Reaction score
4
First Language
English
Primarily Uses
I have version 1.2.9a of Effectus. In the file folder, there are several compatibility patches - including 2 titled "Shaz Bigger Event Collisions" and "Shaz Clone Events." I don't see one for Yanfly however.

Oh, and the Yanfly Ace Save Engine uses sprites to save. However, this has never been an issue before. This issue happened the same time another issue occurred in a different thread I had posted where the events are now above any Show Picture I have. Since the sprites are all overlapping the picture, is this causing the error?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
First Language
English
Primarily Uses
RMMV
The issue with sprites is when the $game... data has sprites attached. Using sprites in the menus isn't an issue, because none of the menu data is saved. The issue happens when someone writes a script that modifies the Game_Event class (or any of the other Game_* classes) and gives it a new property/attribute that is a sprite. There is one Ace script in particular that I'm thinking of, but I just can't remember what it is. It might have something to do with a hud or with an ABS or something. THAT is what causes the issue, because sprites can't be converted to an appropriate data type to get saved with the $game... structures.

I'm actually not sure the saving issue has anything to do with Effectus, which is why I'm confused that Effectus is the script that throws up an error afterwards.

Can you disable Effectus and see if you still have the same issue saving? IIRC it's pretty difficult to turn it off, so the answer might be no.
 

Brigg

Veteran
Veteran
Joined
Apr 22, 2015
Messages
129
Reaction score
4
First Language
English
Primarily Uses
The only thing I can think of is that one of those scripts is using a variable that I may have altered, but I haven't found it if that is the issue - but I could have easily overlooked something. Any picture I use in with Show Picture is now underneath ALL events and some tile graphics.

I can upload the event, but it's a big one. Is there a way, and I'm 99% sure there isn't, that I can get the whole event in one screen rather than snipping piece by piece into photoshop? Because that's what I'm about to start doing.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
First Language
English
Primarily Uses
RMMV
A variable will not cause the game to crash or the save to fail. And I am not talking about the Show Picture command. I am talking about scripts that attach sprites to events. I don't really want to see your event, because there's nothing to indicate that that is the event that's caused the problem. At this stage, you would be wasting your time.

What other scripts do you have? Please list all of them.
 

Brigg

Veteran
Veteran
Joined
Apr 22, 2015
Messages
129
Reaction score
4
First Language
English
Primarily Uses
The Show Picture Overlapping events started when I stopped using a parallel process event to test the Event when I first logged in. I was too lazy to walk over to it when I was frequently playtesting it. It was then that the Save crash would occur. Not sure if any of that helps, but anything that's left unsaid could be the issue. I'm using some ruby coding to shortcut some of the work. Could any of these in the pic I uploaded be causing an issue?
Event.Snip1.png

**Okay. New issue. Ugh. I'm sorry. I remembered I added Hime's "Longer Choices" script to test out. It's a non-commercial script I've been trying to get ahold of Hime to use commercially, but no response yet. However, I disabled it thinking maybe it's causing the issue, and when I go to exit a map, I get a "undefined method 'close' for nil:NilClass."
AutoSaveError1.png
My scripts are:
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
First Language
English
Primarily Uses
RMMV
How 'bout we stick with one issue per thread? You haven't mentioned anything until now about a Show Picture "Overlapping" event, and what does that even mean?

Are you saying the save crash started happening when you started using the Show Picture in a parallel process event?

What is .each_cons? What gets put into variable 145 after that event runs?

I suggest you disable Hime's script for now.

If you go into a debug window immediately before you attempt to save, check what's in ALL of the variables. If any of them have something that isn't pure data (like a sprite type object), that will be the problem.

As I said earlier, maybe it's time to start debugging line by line - in the DataManager script, disable the try/catch to stop it deleting your save file on failure, and right before it tries to write, print each of the $game_... items to the console - one by one and test after each - to make sure of what's in each one. I think $game_system might be a good one to look at, as well as $game_map, to see what's in the events.

Guessing isn't going to solve it. It's time to start looking at things methodically. Slowly, and thoroughly.
 

Brigg

Veteran
Veteran
Joined
Apr 22, 2015
Messages
129
Reaction score
4
First Language
English
Primarily Uses
".each_cons(n)" separates an array into every possible consecutive sections of (n). In my case, consecutive sections of 5. I've built a casino in my game. This particular array is checking if the player's hand has a Straight.

I mentioned the show picture issue, because you said the sprites are the issue for my Save error. And when the save error started happening, all sprites are now overlapping any Show Picture. It just seemed to be connected.

Check all variables, DataManager; $game_system; and $game_map. I'll get working on those. Thanks Shaz!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
First Language
English
Primarily Uses
RMMV
It's going to be a slow process. Good luck :)

You didn't answer my question about whether the error started happening after you created the parallel process event or after you disabled it.
 

Brigg

Veteran
Veteran
Joined
Apr 22, 2015
Messages
129
Reaction score
4
First Language
English
Primarily Uses
None of the issues started happening until after I turned it the event into an Action Button event. It was only a Parallel Process so I could test it out the moment I loaded it in. And I had never bothered trying to save since I was only testing it. However, the overlapping sprite/event issues weren't happening during the Parallel Process testing.

Hope that answers your question.

I just went through the variables in playtest mode, and there were a couple of variables that still were retaining a lot of information. Two of them specifically. When I saw them, a red flag went up, so I when exiting the event, I made all the variables revert to 0. Now saving doesn't seem to be an issue any longer.

The 2 variables were retaining an array of 52 characters. I wouldn't think that would be an issue. The first one was all numbers, but the second one was 13 each of ♥, ♦, ♣, and ♠. The array was doing something really funny. I'm wondering if they were causing a problem.
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

XwwX OMG! Only 4 more weeks till I can leave my crappy job and never ever go back! I am SO freaking excited!!!
Sometimes, it's so hard to resist
"this boss is too easy, what if I add more gimmicks". Then I remember most of my players might be already dying fighting the boss.
You certainly should show love and recognition to teammates who have achieved great success! Congrats Eli!
Just 2 Days of no Internet and I made more Progress in my Game than last 2 Weeks combined. Now I know, Internet makes me a Lazy person.. :D
I'm back to the bugs.
100 bugs in my coding,
take one down,
fix it up,
132 bugs in my coding.

Forum statistics

Threads
98,075
Messages
949,085
Members
129,354
Latest member
mojiijou
Top