Hello, please tell me how to fix it. I wanted the music to turn off when the button was pressed and also turn on when pressed.
Aker else
must be vertically aligned with if
.
Philpot I keep getting new errors no matter how I try to align the text.
Aker Well, you should address each error, see what error message says and try to find what's causing it.
I've already had chatGPT4 rewrite the code anyway error
Aker Try to put the dollar sign in front of back_music
Aker For various reasons don't rely on ChatGPT.
And as xyz already said back_music
needs to be renamed to $back_music
in your code because you want to access the node in your scene and not a variable in your script.
Thanks, after I put the $ sign in front of back_music, the errors disappeared. But the music off/on button still doesn't work.
Aker Is your button “pressed” signal correctly connected? Also looks like there are a lot of other errors.
Shiftless when I click on the button, the following appears
Shiftless There is no connected method '_on_texture_button_pressed' for the 'pressed' signal from the 'menu/TextureButton' node to the 'menu/TextureButton_Music' node.
Aker Rename the function in your code to the one in the error message.
Aker What was your introduction to Godot? Did you watch tutorials or read the documentation?
If you haven’t already then read the “Getting Started” chapter in the manual. You can skim it at first and re-read it later but make sure to do the two “your first game” tutorials as they will teach you the basics and they are a great place to start.
https://docs.godotengine.org/en/latest/getting_started/introduction/index.html
Shiftless Please help me with my other question. He's in my profile.
Aker What other question?
© 2022 - 2024 — McMap. All rights reserved.