MZ: TypeError: Cannot set property 'effects' of undefined

Status
Not open for further replies.

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
423
Reaction score
70
First Language
Spanish
Primarily Uses
RMMV
window.v = $gameVariables._data
window.s = self(1,1)

It seems like this window. which I previously used in MV produces this error. Yet if I remove it the game can't identify these variables correctly.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,842
First Language
English
Primarily Uses
RMVXA

I've moved this thread to Learning JavaScript.

I think this is the best board for what you're asking about, but it's not clear as you will likely need to provide more detail before someone can offer a helpful response:
  • I know you are trying to use this code in MZ, but is that code part of an MZ Plugin, an MV Plugin, a custom plugin you are making yourself, or something inserted into the game's base code? If it is a plugin, you should post a link to that plugin here. If it is base code, you should paste the entire method here.
  • What does 'window' refer to in this context? Where was 'window' defined?
  • Where is 'effects' defined for 'window'? Also, since the error is saying that 'effects' is trying to be read for some kind of object (likely 'window' but not certain), you should paste the line of code (and the couple lines around it) that the game tells you caused the crash.
  • What are you trying to do with this code?
Hopefully with that information you can get some better answers about why this is happening and how to correct it.
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
423
Reaction score
70
First Language
Spanish
Primarily Uses
RMMV
My bad, I overlooked an obvious syntaxis error when creating an array. Solved :D
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,721
Reaction score
15,304
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

thought I'd upgrade to mz from mv cause of the nice quality of life features but ****ing hell why couldn't they allow old plugins to work in it and secondly how come in over a year since it's release has there been no mz version of something so crucial as a non grid based movement plugin. I guess I'll stick with mv. (why wasnt mz just an update to mv anyway literally nothing substantial changed..)
Something might be coming...
Hallo.png
A new day for creating :)
2021 has been the runner-up for the worst year of my life. 2015 may take that title, but '21 is pushing it. Excuses really don't justify how much of a jerk I've been this year to a lot of people.

I'm sorry. I don't intend to be a jerk forever, but I'd rather back up my intent with actions, not words.

Forum statistics

Threads
116,020
Messages
1,094,982
Members
151,337
Latest member
Laura1999
Top