Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Cannot read property 'type' or undefined

A topic by Sabinremson created Aug 12, 2024 Views: 144 Replies: 3
Viewing posts 1 to 4

Hello,

I have just recently purchased your Character Generator, and my generator ID set to Example in the plugin Command, but I am getting a Cannot read property 'type' or undefined error, please assist.

Thanks.



Developer

Hi there!

Let's figure this out. But, you need to give me more information.

  1. When this error happens again, press F12. A browser window will open. Go to the CONSOLE tab, and send me a screenshot of what is in there.
  2. This error is happening as soon as you use the plugin command?
  3. By your screenshot, you seem to be using the CHARACTER MANAGER map, which is another plugin. Did you try to go into the CHARACTER GENERATOR map, and test the plugin there? 
  4. Also, after you purchased the plugin, ou need to copy and paste it inside the js folder of the sample project, and also activate it on the plugin manager. Since it is a Pro(paid) plugin, by default, the sample project does not have it.

Hakuen, thanks so much for your prompt reply!

1. Here is the screenshot of the debug window after pressing F12.

2. This error is happening as soon as I go to generate a character in the Char1 space.

3.  I previously just copied the event over to simplicity sake, but have since changed it out with a teleporter instead to make sure I am on the CHARACTER GENERATOR map.   I get the same exact error now (Screenshot above is the updated error while on the CHARACTER GENERATOR map*).

4. I have added and enabled the PRO plugin of your generator.  It is placed at the bottom underneath all of the other plugins, is this OK?

Developer

Hi!

  • So, I downloaded again both my sample project and the Character Generator plugin here on itch io.
  • Copy and pasted the plugin into the sample project and activated it on the plugin manager. 
  • Hit playtest, and everything is working just fine.

So, first, if you are getting this error, it's because something is changed. You need to know what did you change, and why. Even if you didn't notice, you may be changed something.

This error is happening because the plugin can't get a category, therefore, can't get a piece(The image to be used as a part of something). The only that would happen is if you didn't setup that generator properly.

  1. My advise is, repeat the following process on this order:
  2. Download Sample project
  3. Download Character Generator Plugin
  4. Put the Character Generator Plugin inside the JS folder of the Sample project.
  5. Open the sample project, go to the plugin manager, activate the Character Generator plugin.
  6. Save the changes
  7. Hit Playtest on the Character Generator map and just interact with the events

With this you should be able to use the plugin with the default settings. This is an important part for you to understand how the plugin works, so you can build your own generators in the future.

With that, you will have the help file and a working version for you to take a look and compare with your stup to understand what is right and what is wrong.

If you still didn't manage to make it work, add me on discord and send me this exactly project you used that is triggering this error so I can take a look.

My discord: hakuenstudio