Help! Object Too Deep (Error)

So... I have been working on this game for over a month now and today all of the sudden im getting this error.


I am almost in tears!


I have looked it up and no one is having it the way I am.


Everytime I test my game it gives this error.


I made two recent changes, I added yanflys item core, and cleaned up the projects folder where I keep all my game stuff, but nothing in my GAME folder.


I cant imagine it would have anything to do with that.


At first, it said something to do with the storybook script I was running, so I removed it all together and any traces of it from my game since i wasnt planning on using it anyway.


Then it started giving me this error.


Error: Object too deep
    at Function.JsonEx._encode (rpg_core.js:7756)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)
    at Function.JsonEx._encode (rpg_core.js:7766)


I don't understand Java script so when I looked at the line that was broken I can't see what is broken about it.


But it's not saying anything about the storyboard script anymore.

Spoiler
2016-06-25.png
Errors like that generally mean you've done something like adding the same script twice, or that two scripts are using the same alias for the same method.


The lines reported are probably NOT where the error is going to be.


You didn't already have the item core in your game did you, and you just added it again?


Can you show a screenshot of the Console from the developer tools?
No it's not there, I even checked because I thought I might be silly enough to try that...


But nope, when I remove his script it works i just found out, but no matter where I put the itemcore it just ... is too deep lol

2016-06-25 (1).png
oh - I wonder what it's trying to encode ... I wonder if it's something that's got a recursive reference?


If you pop a breakpoint on line 7754 (first line of the function) and take a look at what's in value when it's first passed in.


Edit: just saw that you've confirmed it's the item core script that's causing it.  Things I can think of to check ... does your project contain all the latest core scripts (is it 1.2.0 version of MV and if you created it in an earlier version did you copy those files over into your project)?  Are you using the latest version of Item Core?  Does it rely on any other scripts and do you have them installed?


Does this happen when you start a brand new game as well as when you go to load a saved game (or don't you get that far)?  What are you trying to do at this point - is it just launching the game or are you attempting to save?
It wouldnt even let me get into the game to save it, or let me do anything just click test play and then error lol.


That's what ive done everytime ive tried with either scipt, both and neither and then finally it works with storybook and itemcore.. which sucks because I did a lot of work to get that storybook thing working good lol
sorry - I was editing my post and asking more questions - I think you've answered everything anyway, but just check to see if I've asked anything that you haven't tried yet.



I suggest you head to Yanfly's thread for the plugin and just state what the error is, maybe with a link back to this thread.
Just another question: Which version of the item core plugin are you using?


If I remember correctly, the one that got distributed as extra in the launch package had a bug, and you need to download the newest version from yanfly - which requires your project to be updated to 1.2 iirc.
Not sure if this has been solved, but I was having the exact same issue and I fixed it by creating a whole new Project, re-adding all plugins, deleting everything from the new Project's data folder and replacing it with the contents of the old Project's data folder.

Original thread: https://forums.rpgmakerweb.com/threads/help-object-too-deep-error.64145/