#I ran into an error while making "dodge the creeps" on the godot tutorial site. Help!

1 messages · Page 1 of 1 (latest)

karmic barn
#

When I run the program, it says "Invalid type in function 'clamp' in base 'vector2'. Cannot convert argument 2 from Nil to Vector2. Godot highlights the last sentence with a yellow arrow.

fathom crystal
#

are you setting screen_size? That seems to be null

karmic barn
fathom crystal
#

then something is missing

#
func _ready():
    screen_size = get_viewport_rect().size
#

you missed this