I have encountered an error that states: “this.entity.sound.play(“bulletSoundFX”);”. Although, when I start my game and start to shoot, it does play the soundfx that i linked it to. It just keeps showing that error code like the image attached below.
Hi @tsrng and welcome! Can you please share the editor link of your project, so someone can take a look?
PlayCanvas | HTML5 Game Engine here you go! Thanks!
Your script has also been added to an entity without a sound component.
Tried this. Still getting the same error code
Still getting the same error code.
That’s another error that has to do with the lines below.
Double checked the codes and it’s still showing the same thing.
It seems that the asset ID is not correct.
May I please have a breakdown of the things that need fixing? I am fairly new to PlayCanvas and have very little experience with coding games. Thank you very much.
I don’t have a list. I’m just checking where the current error is coming from. Some new errors are only visible when a previous one has been solved.