Skip to content Skip to sidebar Skip to footer

Cannot Read Property Add React or Undefined Rpg Maker Remove Title

Poppie360

  • #1

Can anyone assistance me out? I cannot figure out why I am getting this error:
I had fabricated an edit to the windows.js file in social club to be able to motility the choice box around but I cannot effigy out why it is doing this. i can change the X position but i cannot change the Y position.

3497294bd012f43c2c7710d3e74b692d.png

e7b0a119fe21f48abb6c6aba04982fbd.png

here is the fault that i get when trying to fix the Y position of the box (the Ten position works just fine for whatever reason)

88fd04a371b2f6ea37f531df5d4b5567.png

Poryg

Poryg

Dark Lord of the Castle of Javascreeps
  • #2

X doesn't piece of work either. You're calling Window_ChoiceList.prototype.updatePlacement, which is not a static function. Therefore you can't phone call it as a prototype part, you have to call information technology in relation to the detail pick list window. I recommend y'all to go through a C++ tutorial to learn the basics of object oriented programming.

Poppie360

  • #3

10 doesn't work either. You're calling Window_ChoiceList.image.updatePlacement, which is non a static function. Therefore you can't telephone call it equally a epitome function, you take to call it in relation to the particular pick list window. I recommend you to become through a C++ tutorial to acquire the nuts of object oriented programming.

oh await, i forgot i yet had that in, when i DON'T have that chip in it does work for the well-nigh part:

2ee7c498e7465b93e2c8701010be3d18.png

ff01c836e41e6596efefb572a05da388.png

Equally you can run into the Y position refuses to change, i have no thought why this is the example and why ony the x position wants to change when i tell it to. exercise y'all know why?

  • #4

I've moved this thread to Javascript Support. Give thanks you.

Poryg

Poryg

Dark Lord of the Castle of Javascreeps
  • #5

So now the three functions are the same just without
Window_ChoiceList.paradigm.updatePlacement
line?

Poppie360

  • #6

So at present the iii functions are the same just without
Window_ChoiceList.epitome.updatePlacement
line?

yep pretty much:

274f39ccf8df15eb62a6b95d50ca6b52.png

Poryg

Poryg

Nighttime Lord of the Castle of Javascreeps
  • #seven

So at present you are setting the window'due south X to 155 and Y to 425. That's what is happening.

Poppie360

  • #9

So now you are setting the window's Ten to 155 and Y to 425. That'due south what is happening.

no, that is a plugin that changes the textbox window to a certain identify...although that might disharmonize with what i am trying to do, let me try to see if it would fix information technology.

(and the position of the choice box is set relative to variables 19, 20 as indicated in the event i shared a flick of.)

Man, i have no idea... I made several snippets in my game with windows. When i accept this error, sometimes i take to edit the rpg maker file instead of made a snippet. And so it work.
Watching the code, I encounter there's something different for other Windows:
Case 0
Instance 1
Case 2
I recall this has a relation with the position of the message box(center, left, correct)
So I gauge you have to effigy that out.
Maybe the y position is defined through the position of the message box.
Or
You can use SRD super tools.js
And adjust the Windows with that.

it is set outside of the cases so it would change the positioning regardless of it

Poryg

Poryg

Dark Lord of the Castle of Javascreeps
  • #10

No, it is not relative to the variables.
You fix the variables to certain values and so call a role called Poppie.eleCalc.BattleChoiceOn().
This function sets the Ten and Y to values divers exactly in that part.

I think you wanted to make the positioning relative by the updatePlacement method, since that contains the ii codes that would brand the positioning relative to the variables. All the same, you fabricated a mistake that instead of calling the window's method you chosen the prototype method, so y'all naturally got the fault.

And so if y'all want, edit the BattleChoiceOn function to this:

black_custom_window.x = $gameVariables.value(xix);
black_custom_window.y = $gameVariables.value(twenty);
and it should piece of work as you lot intended.

Poppie360

  • #11

No, information technology is not relative to the variables.
You set the variables to certain values and and then phone call a function called Poppie.eleCalc.BattleChoiceOn().
This function sets the 10 and Y to values divers exactly in that function.

I recollect yous wanted to brand the positioning relative by the updatePlacement method, since that contains the two codes that would brand the positioning relative to the variables. However, you made a error that instead of calling the window's method you called the paradigm method, so you naturally got the error.

So if you want, edit the BattleChoiceOn function to this:

black_custom_window.x = $gameVariables.value(nineteen);
black_custom_window.y = $gameVariables.value(20);
and it should work every bit you intended.

no, it doesn't affect the selection window:

3da8ced49d87990f5a5ade476d1ceec0.png

1fa889460051eaadff300c349baafb9b.png

f375f416763765bd60622a0641e6c847.png

the aforementioned result with the Y centrality of the box persists without that code, the lawmaking is reposnible for moving the message window not the selection window.

Poryg

Poryg

Night Lord of the Castle of Javascreeps
  • #12

Oh, I see, so the black_custom_window is that window that says "What will you do?". It makes sense at present.

In that case my previous statement is valid. The starting time code had the right thought, but not the right execution. Instead of Window_Choicelist.image you lot need to know the name of that exact window object. You can find it via the dev tools, should be one of the windows inside the window layer inside SceneManager._scene.

Poppie360

  • #13

Oh, I see, so the black_custom_window is that window that says "What will y'all do?". It makes sense now.

In that instance my previous statement is valid. The first code had the right idea, merely not the right execution. Instead of Window_Choicelist.prototype you demand to know the name of that exact window object. Y'all can discover information technology via the dev tools, should exist one of the windows inside the window layer within SceneManager._scene.

no, it isn't that window, but rather a command for the plugin: http://www.gdunlimited.net/scripts/rpg-maker-mv/window-scripts/custom-position-message-box this plugin will move the location of all window boxes created to the betoken where you define while information technology is told to do and then. i wish to effigy out how to practice the same thing for the choice boxes.

Poryg

Poryg

Dark Lord of the Castle of Javascreeps
  • #14

Oh, I see. Nevermind that custom black window then. Revert the game code back to what information technology was in the start post. And then find the name of that item choice window and substitute Window_Choicelist.prototype for that name.
Type SceneManager._scene in the console (f8 or f12 in game) and wait for something that has Window_ChoiceList next to it in it. It could be _choiceWindow or something, in which case the name would be
SceneManager._scene._choiceWindow

Poppie360

  • #15

Oh, I see. Nevermind that custom blackness window then. Revert the game lawmaking dorsum to what it was in the offset post. Then find the name of that particular pick window and substitute Window_Choicelist.prototype for that name.
Blazon SceneManager._scene in the console (f8 or f12 in game) and expect for something that has Window_ChoiceList next to it in it. It could be _choiceWindow or something, in which case the name would be
SceneManager._scene._choiceWindow

221d9653208034dc5b4eef9873ca97f8.png

"_choicewindow: window_choicelist" ? is that what y'all were talking near.

Poryg

Poryg

Dark Lord of the Castle of Javascreeps
  • #16

Yup.
Try
SceneManager._scene._messageWindow._choiceWindow.updatePlacement();

instead of Window_ChoiceList.prototype.updatePlacement();
in the code in your first mail service.

Poppie360

  • #17

Yup.
Effort
SceneManager._scene._messageWindow._choiceWindow.updatePlacement();

instead of Window_ChoiceList.prototype.updatePlacement();
in the code in your beginning post.

0dc08ed658f97193b1aaf231dcfe882e.png

So information technology didn't alter anything, but here is something that is very weird:

0d4a18905c61f581df802f6611be1a27.png

it works for this effect, i have control over the X and Y axis

479ce85fe9df31a58d877a8ed30a8360.png

and here is that event, why does this work but the other doesn't?

Poryg

Poryg

Dark Lord of the Castle of Javascreeps
  • #18

Have yous ever messed around with the first window using the super tools engine? If yep, it might be an selection. If not, then maybe it's a dissimilar window. Information technology's all so messy that information technology'south stopping to make whatsoever sense to me.

Poppie360

  • #19

Have y'all ever messed around with the starting time window using the super tools engine? If yes, it might be an option. If not, so maybe it's a dissimilar window. It'southward all so messy that information technology's stopping to brand any sense to me.

the super tools engine doesn't edit text windows:

1b08f0fc884ad126b0d0ee4bfd14180c.png

and then that isn't an option, i could endeavour to mess with common events to come across if that works

Poryg

Poryg

Dark Lord of the Castle of Javascreeps
  • #20

Well, information technology'due south officially gotten weird. If I could accept a look at the project itself, I could explore. Without information technology I can only guess. Is the item guard assail skill run window a custom created one or just a default choice window?

bonettilovicher.blogspot.com

Source: https://forums.rpgmakerweb.com/index.php?threads%2Ftypeerror-cannot-read-property-y-of-undefined.102969%2F

Enregistrer un commentaire for "Cannot Read Property Add React or Undefined Rpg Maker Remove Title"