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

20.2 Variable not defined #949

Open
GiacomoCampioni opened this issue May 2, 2024 · 0 comments
Open

20.2 Variable not defined #949

GiacomoCampioni opened this issue May 2, 2024 · 0 comments
Labels
content Issues with the lessons, practices, including their code examples

Comments

@GiacomoCampioni
Copy link

Solution requires calling an array variable called that is not defined anywhere before.
Defining it inside the function prints out an error, even though the script functions the same.

Solution provided by GDQuest:

func run():
	combo = ["jab", "jab", "uppercut"]
	for action in combo:
		play_animation(action)

Alternative solution that does not get accepted:

func run():
	var combo = ["jab", "jab", "uppercut"]
	for action in combo:
		play_animation(action)
@GiacomoCampioni GiacomoCampioni added the content Issues with the lessons, practices, including their code examples label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Issues with the lessons, practices, including their code examples
Projects
None yet
Development

No branches or pull requests

1 participant