Gridster Cannot Read Property 'width' of Undefined

Joined
Jul 24, 2021
Messages
3
Reaction score
ane
First Language
Dutch
Primarily Uses
RMMZ
  • #1

Hi at that place,

I've been working on a game, using RPG Maker MZ, for some fourth dimension now, simply I'm encountering a problem I can't seem to ready. I've been going through the forums, without any luck. This is my kickoff time posting a question online, and I promise someone can assist me! I accept no real coding experience...

So, about the error: There are a lot of random encounters in the game, and sometimes with a random encouter, I suddenly become the error "TypeError Cannot read holding 'width' of undefined". I exchanged the images, no luck. I switched off my plugins (SRD and CGMZ), no luck. All my enemies and troops are consistent and don't refer to whatever deleted images or anything.

I switched on DevTools, and this is the error-bulletin I got. I hope someone tin can help me empathise this! If I'm posting this wrong/in the incorrect identify, please let me know!

rmmz_managers.js:2030 TypeError: Cannot read property 'width' of undefined
at Sprite_Enemy.updateFrame (rmmz_sprites.js:1003)
at Sprite_Enemy.Sprite_Battler.updateMain (rmmz_sprites.js:504)
at Sprite_Enemy.Sprite_Battler.update (rmmz_sprites.js:485)
at Sprite_Enemy.update (rmmz_sprites.js:961)
at Sprite.update (rmmz_core.js:1971)
at Sprite.update (rmmz_core.js:1971)
at Spriteset_Battle.Sprite.update (rmmz_core.js:1971)
at Spriteset_Battle.Spriteset_Base.update (rmmz_sprites.js:3162)
at Spriteset_Battle.update (rmmz_sprites.js:3627)
at Scene_Battle.Scene_Base.updateChildren (rmmz_scenes.js:129)
SceneManager.catchNormalError @ rmmz_managers.js:2030
SceneManager.catchException @ rmmz_managers.js:2018
SceneManager.update @ rmmz_managers.js:1941
Graphics._onTick @ rmmz_core.js:800
TickerListener.emit @ pixi.js:9474
Ticker.update @ pixi.js:9928
Ticker._tick @ pixi.js:9679
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682
requestAnimationFrame (async)
Ticker._tick @ pixi.js:9682

caethyril

Joined
Feb 21, 2018
Messages
3,124
Reaction score
2,413
First Linguistic communication
EN
Primarily Uses
RMMZ
  • #2

It implies that 1 or more enemies involved do non have an image at the point when the error occurs. Ideas:

  1. Check your enemies! Make sure all enemies take an image assigned. I approximate you've already checked, merely it'due south best to make sure. :kaohi:
  2. Check your troops! Mayhap some of them have enemies without images. If y'all exam a troop and the error occurs, press the Clear button to remove all enemies and then re-add the enemies that should be at that place.
  3. Cheque your plugins! Subsequently making any changes in the Plugin Manager, save your project. If you lot don't relieve before testing, those changes will not exist seen during test.

Also, note that you tin update your project's core scripts to a newer/older version via Game > Update Corescript from the editor'southward menu bar. Newer versions accept various problems-fixes, details here:

I'm mentioning this because your error bulletin reports line number 1003 but I think that would be 1004 in v1.3.two of the core scripts. :kaoswt:

Andar

Joined
Mar five, 2013
Messages
35,018
Reaction score
9,069
First Language
German language
Primarily Uses
RMMV
  • #iii

basically the fundamental part of the error message is the "of undefined".
that always means that the engine is missing a data object, either because y'all deleted the object in the database without removing it everywhere it was used, or because of a plugin data conflict.

In this specific case I agree that it is most likely a missing enemy since you already replaced the images of all enemies you believe to be used - which rarely include forgotten and invisible references to deleted enemies.

Joined
Jul 24, 2021
Letters
iii
Reaction score
one
Offset Linguistic communication
Dutch
Primarily Uses
RMMZ
  • #four

Wow, thanks a agglomeration, caethyril for your detailed and helpful answer!
Finally the upshot seems to have been resolved...I reset all the plugins again, which didn't seem to piece of work, but and then I replaced 1 of the enemy-images I created with a new version version (merely saved the .png again, no modifications, but gave it a different name), and that seems to have done the pull a fast one on somehow...

I as well updated the corescript, thank you for pointing that out!

Thank you very much!!! This was a bully beginning feel of asking a question here ^.^

It implies that ane or more enemies involved do not have an prototype at the point when the error occurs. Ideas:

  1. Check your enemies! Brand sure all enemies take an image assigned. I gauge yous've already checked, but it's all-time to make sure. :kaohi:
  2. Check your troops! Maybe some of them have enemies without images. If you test a troop and the fault occurs, press the Articulate button to remove all enemies then re-add together the enemies that should be there.
  3. Cheque your plugins! Later on making any changes in the Plugin Managing director, save your project. If you don't save earlier testing, those changes will non be seen during test.

Besides, notation that you tin can update your project's cadre scripts to a newer/older version via Game > Update Corescript from the editor'due south card bar. Newer versions have diverse bug-fixes, details here:

I'thou mentioning this considering your error message reports line number 1003 simply I recollect that would exist 1004 in v1.3.2 of the core scripts. :kaoswt:

Joined
Jul 24, 2021
Messages
3
Reaction score
1
First Linguistic communication
Dutch
Primarily Uses
RMMZ
  • #v

basically the fundamental part of the mistake message is the "of undefined".
that always means that the engine is missing a data object, either because yous deleted the object in the database without removing it everywhere it was used, or because of a plugin data conflict.

In this specific case I concur that it is most likely a missing enemy since you lot already replaced the images of all enemies you believe to be used - which rarely include forgotten and invisible references to deleted enemies.

Thanks, Andar! Indeed it seemed to exist connected to the enemy images!

blytheinsch1948.blogspot.com

Source: https://forums.rpgmakerweb.com/index.php?threads/issue-with-typeerror-cannot-read-property-width-of-undefined-please-help.138873/

0 Response to "Gridster Cannot Read Property 'width' of Undefined"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel