Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug. getting error "TypeError: Cannot read property 'plugin' of undefined" #447

Closed
lynxieles opened this issue Aug 21, 2020 · 11 comments
Closed

Comments

@lynxieles
Copy link

lynxieles commented Aug 21, 2020

When I try to compile a game to test some of the new features I'm getting an error that prevents it from finishing.
I cannot find any source of the issue and I'm unsure what to look for.
I have copied the code where it fails.

Preparing variables...
Preparing strings...
Preparing images...
Preparing ui...
Preparing sprites...
TypeError: Cannot read property 'plugin' of undefined

Warnings:

  • TypeError: Cannot read property 'plugin' of undefined

Edit: updating with the tracker template
SCP.zip

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem:
open a project I made in the 1.2.1 version in beta 2.0.
does not occur with a new project made in 2.0.
What is the expected behavior?
No error while building the project.

What is the motivation / use case for changing the behavior?
Being able to run my project

Please tell us about your environment:
Mac catalina version 10.15.4
GB Studio Beta 2.0

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
I have attached the project file for RichardULZ. I will likely remove it at a later date.

@RichardULZ
Copy link
Contributor

Are you compiling an old game or a new template?

Please follow the issue tracker template by including the version being used and operating system with all issue posts.

@bigjawed
Copy link

I get the same error when i eject the engine then delete the engine folder. (im using the 64 bit version.)
Screenshot (90)

@bigjawed
Copy link

i do notice that "main.c" disappears after you eject it again.

@noje999
Copy link

noje999 commented Aug 22, 2020

I've also been getting this error on the 2.0.0 Beta, on MacOS Mojave (10.14.6) whenever I click the play button to test my build. In my case It's an old game that I migrated to the new beta, if that affects anything at all.

@RichardULZ
Copy link
Contributor

Perhaps the project previously used plugins for an event, and something related to that plugin changed, or it's not liking plugins at all.
One common plugin may have been the menu event, but without character limits for safety.

If anyone is able to provide a project zip that reproduces this issue, that would be very helpful.

@bigjawed
Copy link

The best thing you could do is load your backup by deleting the .gbsproj and renaming your backup file name to .gbsproj

@lynxieles
Copy link
Author

I have updated the issue with a bit more detail and uploaded a project zip as requested by RichardULZ.

@pau-tomas
Copy link
Contributor

pau-tomas commented Aug 23, 2020

The issue is that the player spritesheet isn't assigned in the World Editor. Selecting the right sheet should make things work again.

image

I still don't know why this happened, @lynxieles could you upload the 1.2 version of your project to be able to compare it with the 2.0? Thanks!

@lynxieles
Copy link
Author

I'm not sure myself. It got wonky after I accidentally deleted a file I think. I thought I fixed the sprite sheet issue in the previous version but I must have missed one. That totally fixed it. here's the old one if you want to look at it. thank you so much for the help.
SCP.zip

@pau-tomas
Copy link
Contributor

Interesting, the 1.2 project didn't have a Sprite Sheet selected for the Player but it was compiling fine (and, I guess, just selecting an arbitrary sheet? 🤷 ). I don't think we should support that case, but instead add a more clear warning to the compiler:

image

@lynxieles
Copy link
Author

Honestly in the old version I'd just manually set the sprite sheet myself so I really never noticed. I'm glad my mess up could help other people too.

pau-tomas added a commit to pau-tomas/gb-studio that referenced this issue Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants