Galvs Fishing mini game error Line 753

Long Lost Hero

Veteran
Veteran
Joined
Feb 6, 2015
Messages
38
Reaction score
6
First Language
English
Primarily Uses
Ok, so this is a great fun script. I added a chest to the demo with add_fish(3) after I moved it in the script to x position 100. Had it call a common event that gave the player some coins. Seemed to work with my tests.

Then I added a mermaid as fish[5] and set her up in the script and she works by appearing around the chest and guarding it kinda. She only goes after keys, bait[6]. I set her up like so:

FISH[5] = [    # A mermaid!                   "fish5",     # graphic                   3,           # speed                   5,           # pull                   2,           # move type                  [0,3],        # level                   100,         # x pos                   27,           # item                  [6],    # bait type                  "",           # custom se                  [100,50],      # range                  0,            # common event                  [78,95],    # length                  [70,99],    # weight                  true,        # stats                  "Mermaid",           # custom txt              ]You have to kinda use the bait to lure her awy from the chest then cast for the chest. Everything seems to work most of the time but sometimes when I catch the chest just as I reel it in and catch it, the game crashes and this error pops up. This happens even if I catch the mermaid first.

I'm not sure what's going on or what it means by undefined method. Line 753 is

SceneManager.scene.refresh_menusAny ideas?

galv error.jpg
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Link to the script?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Try to change that line to this:

Code:
SceneManager.scene.refresh_menus if SceneManager.scene_is?(Scene_GFish)
 

Long Lost Hero

Veteran
Veteran
Joined
Feb 6, 2015
Messages
38
Reaction score
6
First Language
English
Primarily Uses
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

Link to the script?
Opps sorry, it had ben a long night of tinkering and testing.

http://galvs-scripts.com/2013/04/20/fishing-mini-game/

I posted there and I think Galv can figure out what went wrong. I'm going to restart fresh from a new copy of his demo and add another mermaid and see if it still happens after I test his demo a bit more to see if it's a problem with his script. Probably something I did, I don't see how though.

Try to change that line to this:

SceneManager.scene.refresh_menus if SceneManager.scene_is?(Scene_GFish)
I'll see what happens. (An hour later) Ok I tested every possibility, catch mermaid, catch chest, lure mermaid, catch chest fast. Catch chest and break line 3-5 times, catch all the other fish first, etc... seems to have stopped happening. I will add some more rocks with different x positions and some fish and see if it happens again. Thanks.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
The issue was not with your fish setup.


It happens when you catch a "fish" with a common event attached to it.


If a common event starts, it leaves the fishing scene and goes to map automatically, and Scene_Map does not have any method with the name 'refresh_menus' which is why it will give a NoMethod error.


Giving that condition to the method call made sure that it is not called unless the current scene is the fishing scene, so the error should never happen again.


It happened because of wrong arrangement of method calls in a method (in the 'caught_fish' method), where the common event is called before the refreshing of windows.


Anyway, you shouldn't have any issues from now on. :)
 

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top