Error thrown when getting Map Scene width

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Are you using plugins? Did you disable them first? Does the bug still happen? Then report here.


No, this happens on a brand new 1.3.1 project.


Is your bug already reported by another person? Don't make a new topic. Reply to that thread instead if you have anything substantial to add.


I'll be honest, I haven't checked, but seeing as this is an issue only plugin developers would encounter in rather specific circumstances, I doubt it.


Bug Explanation: (What is the bug in your own words? Keep this detailed. "It isn't working right" is not a valid bug report.)


When attempting to get the width of the map scene, a TypeError is thrown. This does not crash the game if it's run when the scene is already running, however it does crash the game if it's called while the scene is loading (By what black magic I do not know). 


Error Report: (If you received an error message, press F8 when the message is received to open up the debug console, then copy/paste the entire error log and paste it here).




Exact Steps on How to Replicate Bug: (Write out IN DETAIL, a step-by-step guide on how to replicate the bug.)

  1. Start game.
  2. Get on map
  3. Open dev console
  4. Type in "SceneManager._scene.width"
  5. Press enter
  6. ???
  7. Error





Sample Project (REQUIRED): A sample project MUST be attached to the bug report. All steps MUST be followed. If a single step is ignored, the bug report is invalid and I will move on to the next bug report.  If you do not attach a sample project to the bug report, your bug report WILL BE ignored. This must be kept under 90 MB lower. Do not include RTP Graphics save for the ones used. You must make this project as small as possible. There are NO exceptions.


I don't really find this to be necessary, but since it's a requirement, I've got one here. I removed a lot of things to get it to be small, so the main menu won't open because an image is missing. You should still be able to get the issue just by creating a brand new project and doing the steps listed above.


Now like I said, this doesn't crash the game, and I have a way to get around the issue so really it's no big deal, but I just figured you should be made aware so that it can be fixed in a future update if anyone finds out why it's broken as such.
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
Are you using plugins? Did you disable them first? Does the bug still happen? Then report here.


No, this happens on a brand new 1.3.1 project.


Is your bug already reported by another person? Don't make a new topic. Reply to that thread instead if you have anything substantial to add.


I'll be honest, I haven't checked, but seeing as this is an issue only plugin developers would encounter in rather specific circumstances, I doubt it.


Bug Explanation: (What is the bug in your own words? Keep this detailed. "It isn't working right" is not a valid bug report.)


When attempting to get the width of the map scene, a TypeError is thrown. This does not crash the game if it's run when the scene is already running, however it does crash the game if it's called while the scene is loading (By what black magic I do not know). 


Error Report: (If you received an error message, press F8 when the message is received to open up the debug console, then copy/paste the entire error log and paste it here).




Exact Steps on How to Replicate Bug: (Write out IN DETAIL, a step-by-step guide on how to replicate the bug.)

  1. Start game.
  2. Get on map
  3. Open dev console
  4. Type in "SceneManager._scene.width"
  5. Press enter
  6. ???
  7. Error





Sample Project (REQUIRED): A sample project MUST be attached to the bug report. All steps MUST be followed. If a single step is ignored, the bug report is invalid and I will move on to the next bug report.  If you do not attach a sample project to the bug report, your bug report WILL BE ignored. This must be kept under 90 MB lower. Do not include RTP Graphics save for the ones used. You must make this project as small as possible. There are NO exceptions.


I don't really find this to be necessary, but since it's a requirement, I've got one here. I removed a lot of things to get it to be small, so the main menu won't open because an image is missing. You should still be able to get the issue just by creating a brand new project and doing the steps listed above.


Now like I said, this doesn't crash the game, and I have a way to get around the issue so really it's no big deal, but I just figured you should be made aware so that it can be fixed in a future update if anyone finds out why it's broken as such.


you have 3 choice


SceneManager._screenWidth ;


$gameMap.width() ;


$gameMap.tileWidth();


is ok for you ?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
I already had a way to get around the issue for this specific instance, I used Graphics.width instead, but it's an odd little issue that would be nice to have fixed, since you don't expect that to throw an error at you. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
A scene doesn't have a width.  A map has a width.  If you want the width of the current map, use $gameMap.width()


SceneManager._scene, when you're on a map, refers to a Scene_Map object, not a Game_Map object.
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
I already had a way to get around the issue for this specific instance, I used Graphics.width instead, but it's an odd little issue that would be nice to have fixed, since you don't expect that to throw an error at you. 
you type 


SceneManager._scene.width


SceneManager._screenWidth
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
A scene doesn't have a width.  A map has a width.  If you want the width of the current map, use $gameMap.width()


SceneManager._scene, when you're on a map, refers to a Scene_Map object, not a Game_Map object.


They do have widths, actually. Scenes are Pixi containers. Pixi containers widths are based on their children. I was looking for the width of the scene, but I ended up just using the width of the screen instead. I just wanted to point out that there's an error somewhere with the map scene or its children. And like I said, this bug isn't critical at all. If they never fix it, fine, it's not a big deal, but I found a bug so I reported it.



you type 


SceneManager._scene.width


SceneManager._screenWidth


Either would work, but I use Graphics.width because it's shorter and doesn't make use of a private variable. And yes SceneManager._scene.width is valid. If it weren't already programmed into the game, it would not even be able to throw an error, but would return undefined. However, on the map scene (And as far as I know only the map scene), it will throw a type error.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top