RMMV: Galv Map Properties TypeError Property Erased Of Undefined

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
When I fire a projectile on a map, no projectiles is fired. This happens nine times in a row (hitting the fire button over and over). When I fire a tenth time, I get this error:

Capture.PNG Capture2.PNG Capture3.PNG Capture4.PNG Capture5.PNG
 

Attachments

  • Capture.PNG
    Capture.PNG
    316.4 KB · Views: 6
  • Capture2.PNG
    Capture2.PNG
    61.2 KB · Views: 6
  • Capture3.PNG
    Capture3.PNG
    282.1 KB · Views: 6
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,784
Reaction score
7,875
First Language
German
Primarily Uses
RMMV
1) does this happen after you started a new game or after you continued a saved game or in both cases?
2) please open your project's rpg_core.js file and tell us the number in its title line (which may or may not be identical to your editor version)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
And a link to the plugin?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,604
Reaction score
14,328
First Language
English
Primarily Uses
RMVXA

I've moved this thread to Plug-In Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
1) does this happen after you started a new game or after you continued a saved game or in both cases?
2) please open your project's rpg_core.js file and tell us the number in its title line (which may or may not be identical to your editor version)

Thank you.

1. Both cases
2. rpg_core.js v1.6.1, I have MV 1.6.1

Capture.PNG Capture2.PNG

And a link to the plugin?

Thank you, here is the plugin.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
How do you call it? Can we see a screenshot of the script / plugin command?

It's crashing because it's referring to an event id that doesn't exist.
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
How do you call it? Can we see a screenshot of the script / plugin command?

It's crashing because it's referring to an event id that doesn't exist.

Thank you. It's called via the common event Gun. The screenshot is in my original post.

On the map, I call Gun via this parallel process:

Capture.PNG
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
So which one is running - the common event or the map event?

You are calling Galv.PROJ.quickDir and passing an event id that doesn't exist on that map.
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
So which one is running - the common event or the map event?

You are calling Galv.PROJ.quickDir and passing an event id that doesn't exist on that map.

Both are running. The common event is running via the map event's parallel process. Which event doesn't exist?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
Why are you calling the common event AND calling the plugin directly from the map?

To know which event doesn't exist, you need to look at all your conditions. What is story set to? Is #0001 in the party? What is the value of extra player and extra player 2? Which part of your code is trying to run?

How many events do you have on that map? Is every event you refer to in the common event and the map event actually there?

You could remove the call to the common event and try it again - if it happens again, you know the error is in your map event. Then you could keep the call to the common event, but put an Exit Event Processing right after it, so no more of the map event gets run, then try it again - if it happens again, you know the error is in the common event.

Or you could simplify it and get it working with just one or two events and once that's working properly, expand it to more events.

There are so many things you can try before we start just guessing.

You could change this part of the plugin:
Code:
Galv.PROJ.quickDir = function(id,overrideId) {
    var settings = Galv.PROJ.premade[id];
    if (overrideId) {
        var origId = settings.match(/\d+/i);
        settings = settings.replace(origId,overrideId);
    };
    if (Galv.PROJ.premade[id]) eval('Galv.PROJ.dir(' + settings + ')');
};

to add another line to identify the event id:
Code:
Galv.PROJ.quickDir = function(id,overrideId) {
    console.log(id);
    var settings = Galv.PROJ.premade[id];
    if (overrideId) {
        var origId = settings.match(/\d+/i);
        settings = settings.replace(origId,overrideId);
    };
    if (Galv.PROJ.premade[id]) eval('Galv.PROJ.dir(' + settings + ')');
};

then play with the console open (F8). When it crashes, the last number shown is the event id it's trying to run for and can't find.


(you don't have to quote my whole post when you reply)
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
Why are you calling the common event AND calling the plugin directly from the map?

To know which event doesn't exist, you need to look at all your conditions. What is story set to? Is #0001 in the party? What is the value of extra player and extra player 2? Which part of your code is trying to run?

How many events do you have on that map? Is every event you refer to in the common event and the map event actually there?

There are two events, one for the gun and one for the timer. Yes, every event is there. I've screencapped all of them.

You could remove the call to the common event and try it again - if it happens again, you know the error is in your map event. Then you could keep the call to the common event, but put an Exit Event Processing right after it, so no more of the map event gets run, then try it again - if it happens again, you know the error is in the common event.

Or you could simplify it and get it working with just one or two events and once that's working properly, expand it to more events.

There are so many things you can try before we start just guessing.

You could change this part of the plugin:
Code:
Galv.PROJ.quickDir = function(id,overrideId) {
    var settings = Galv.PROJ.premade[id];
    if (overrideId) {
        var origId = settings.match(/\d+/i);
        settings = settings.replace(origId,overrideId);
    };
    if (Galv.PROJ.premade[id]) eval('Galv.PROJ.dir(' + settings + ')');
};

to add another line to identify the event id:
Code:
Galv.PROJ.quickDir = function(id,overrideId) {
    console.log(id);
    var settings = Galv.PROJ.premade[id];
    if (overrideId) {
        var origId = settings.match(/\d+/i);
        settings = settings.replace(origId,overrideId);
    };
    if (Galv.PROJ.premade[id]) eval('Galv.PROJ.dir(' + settings + ')');
};

then play with the console open (F8). When it crashes, the last number shown is the event id it's trying to run for and can't find.


(you don't have to quote my whole post when you reply)

I've run the console, here are the screencaps. First one is at title screen, second one is when the map loads, third one is when the error occurs.

Capture.PNG Capture2.PNG Capture3.PNG
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
If you had made the change I suggested and saved the plugin, there should be heaps of numbers showing before the error in that console.
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
If you had made the change I suggested and saved the plugin, there should be heaps of numbers showing before the error in that console.

I forgot to close the program beforehand, here you go. I didn't see any numbers in the console.

Capture.PNG Capture2.PNG
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
Sure there's a number. 7. Right above the error message.

So it's saying, when you're trying to run it for event 7, that the event doesn't exist.

Now, you've either deleted an event and haven't created a new one to replace it (so you're missing 7 but you might have 6 and 8), or event 7 is being erased by the plugin or by something you're doing, and then you're trying to target it again.


However, just to be certain, change that part of the code back to what it originally was (you only need to remove that console.log ... line), then find this part:
Code:
Galv.PROJ.getTarget = function(id) {
    if (Number.isInteger(id)) {
        if (id >= -1) {
            switch (id) {

and change it to this:
Code:
Galv.PROJ.getTarget = function(id) {
    console.log('Trying to target event ' + id);
    if (Number.isInteger(id)) {
        if (id >= -1) {
            switch (id) {


This is where it's falling over, and this will determine if it's the same event or if it's doing something weird to the event ids.

It may be possible that it'll be a different event id each time, depending on the conditions. But it's interesting that it's the first event id you target in your map event.
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
Sure there's a number. 7. Right above the error message.

So it's saying, when you're trying to run it for event 7, that the event doesn't exist.

Now, you've either deleted an event and haven't created a new one to replace it (so you're missing 7 but you might have 6 and 8), or event 7 is being erased by the plugin or by something you're doing, and then you're trying to target it again.


However, just to be certain, change that part of the code back to what it originally was (you only need to remove that console.log ... line), then find this part:
Code:
Galv.PROJ.getTarget = function(id) {
    if (Number.isInteger(id)) {
        if (id >= -1) {
            switch (id) {

and change it to this:
Code:
Galv.PROJ.getTarget = function(id) {
    console.log('Trying to target event ' + id);
    if (Number.isInteger(id)) {
        if (id >= -1) {
            switch (id) {


This is where it's falling over, and this will determine if it's the same event or if it's doing something weird to the event ids.

It may be possible that it'll be a different event id each time, depending on the conditions. But it's interesting that it's the first event id you target in your map event.

I got bad eyesight, I can't see the seven. But here's the console:

Capture.PNG
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
so now it's saying it's trying to target event 113. Do you really have an event with id 113?

Try it again - a few times - and see if it's a different event number each time (don't post screenshots - just take a look yourself - you're looking for the line right above the red background).

If the number keeps changing, you may have to rethink your event design.
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
so now it's saying it's trying to target event 113. Do you really have an event with id 113?

Try it again - a few times - and see if it's a different event number each time (don't post screenshots - just take a look yourself - you're looking for the line right above the red background).

If the number keeps changing, you may have to rethink your event design.

Wait a minute! It can't find 113? How is that even possible?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
That's what it says in your screenshot.
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
333
Reaction score
92
First Language
English
Primarily Uses
N/A
That's what it says in your screenshot.

OK, now I'm really curious as to why I'm getting the error with this plugin. It should not be having any trouble finding 113 or 112 because I made those events specifically for the plugin. I can see 7 not being found because I didn't tailor the event to the plugin, just added a plugin command to it, but 113 uses more than a plugin command - it uses the plugin's own parameter, so the plugin should absolutely be finding it on the map.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,777
Reaction score
14,012
First Language
English
Primarily Uses
RMMV
What happens after you've targetted it? Does it get erased? If it gets erased, then the first time you hit it it will be there and will be erased, and the second time you try, it won't be there and will throw an error.

I don't know - I'm only guessing. You're going to have to look at what your events are doing and make sure they're doing the right things, and you have no mistakes.

Or as I suggested several posts ago, change it so it's really, really simple and make sure it works consistently. When you know it's working, then start to add more.

And PLEASE stop quoting me every time you reply.
 

Latest Threads

Latest Posts

Latest Profile Posts

Not sure if it's true (and I won't judge or blame anyone if it is, really), but I heard from confident sources that you guys (and girls) really really like to
How is this new year for everyone? Hope you are well. Still deep in Covid in the US. Its like a vampire and refuses to die with even more strains. I need some holy water to kill it with.
in my game, what's known as HeadSpace is combining with the real world...
oh looks like the forums updated while I wasn't looking and we can put a banner now. Neat!
Treating this as a devlog

Forum statistics

Threads
107,663
Messages
1,031,239
Members
139,788
Latest member
coyoteandghost
Top