I’m having a problems with my game’s scripts working properly !
For example I’ll try to load up my game and the files won’t work the proper way they were coded to be , and everywhere in the files can indeed work because I’ve been working on my game since last summer and up until January this year it’s started to act weird when I load my game up
Editor link - https://playcanvas.com/editor/scene/2049206
1 Like
Hi @Kelvin_Riley2!
Based on the error it seems loginBtn
doesn’t exist.
You also need to (re)import the basis module.
You can do this in the project settings.
1 Like
I believe the logingBtn
may be causing the error behind my scripts not working, And for the basis I already have one imported. Do I re-import another ?
@Albertos can you test out my game again to see my error i’m having trouble with ?
the opening game scene is - https://playcanvas.com/editor/scene/2049206
The Play Now button doesn’t work.
@Albertos do you know how I can fix it then ? Strange thing is when I load up my other scene the game doesn’t work and it’s strange because all my script in the game leading up to now were functional. Can anyone help me figure this out ?
Your project is very complex with a lot of scripts.
I don’t think the error has something to do with the button, so first I suggest to check the setup of the button to be sure everything is correct.
Can you share the scene that should be start when pressing the button?
Code editor - (PlayCanvas | HTML5 Game Engine)
Editor for “Next Scene” when you use the button - (PlayCanvas | HTML5 Game Engine)
When I loaded that scene (PlayCanvas | HTML5 Game Engine)
and this one (https://playcanvas.com/editor/scene/2049206)
the weird thing was that my game didn’t even load the texture, before I made this forum I had my basis in the game but even with it the texture in the game wouldn’t load in like that. I’m just really confused, I was wondering if it’s something with the draco, basis or ammo files
You really need to find a way to see the errors in the console of your browser. (On a Windows device you can use the F12
key to open the console).
You are also over your disk allowance limit, so maybe that can give some problems when you keep adding things.
I did but for my console i’d get that same error you took a screenshot of yesterday, but I don’t know where to go from that though. I just need help because it’s been going on since Christmas now and I tried everything I could by reading other forums, asking ai and even trying to find YouTube videos other my similar situations
Normally you click on the error to reach the line of code with the problem. From there you need to figure out why the line of code is giving the error.
For now I first suggest to clean up your project a bit. Maybe you can remove some large assets you don’t use or something?
Ok, I will and after a few days i’ll update you on this problem. Thank you
1 Like
The loading type of all your script are set to ‘Before Engine’ for some reason, while it should be of type ‘Asset’.
Any reason you changed the loading type of your scripts?
Yes because if you look into the loading screen script - (PlayCanvas | HTML5 Game Engine)
I basically had it coded a way where the game can load up the “eninge's assets
” in a faster way “In-game”, basically all the assets can be loaded up in the loading screen and wont cause any Laggy effects because every single Asset (Render assets, audio & more) can get loaded up all at once .
It seems there is a problem with that logic, because you can see on the console that your script are not loaded correctly.
Im going to replace the loading screen with a default loading screen then. Can you try to load my game up by the ( https://playcanvas.com/editor/scene/2049206 ) scene ? Im currently on my laptop so I can’t test it out at the moment
It’s not only the loading screen. You need to change the loading type of your scripts.
I hope you don’t have 464 scripts in your project.
1 Like
I do Sadly I had to change it because of the “Loading screen Script” but what should I change the type to? should I do after engine, asset or before engine?
I changed it all to assets
, can you test it out for me?