GDQuest / learn-gdscript

Learn Godot's GDScript programming language from zero, right in your browser, for free.
https://gdquest.github.io/learn-gdscript/
Other
2.04k stars 149 forks source link

Lesson 7 Exercise 2 issue #958

Open PscheidtLucas opened 3 months ago

PscheidtLucas commented 3 months ago

Describe the bug In lesson 7, I did the requested exercise but it didn't work, instead of identifying that my square is in the position (100,100), it says that it is in (1000, 1000)

To Reproduce Steps to reproduce the bug:

  1. Go to lesson 7, second exercise: Draw squares at different positions.
  2. Write this code: func run(): for n in 3: position += Vector2(100, 100) draw_rectangle( 100, 100) position += Vector2(100, 100)

Expected behavior This code should work but it does not.

Screenshots image

Information about your device (please complete the following information):

PscheidtLucas commented 3 months ago

If I try to use a var to define the function the program don't even let me run it. image

Bradx commented 1 month ago

in the above screenshot, I think the course is looking for a real number instead of the calculation. Try replacing your values with real numbers. This one had me hung up until I simplified it.