"Standalone lambdas cannot be accessed, consider assigning to variable"

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Laser

I was following a video on how to make a gun recoil animation in Godot 3d when I came across this error

	func _fire():

This is the code. its just the one line and I tried assigning to a variable but I’m new to Godot and t didn’t work, suggestions?

Perhaps this is completed later in the video, but that’s just a guess as it isn’t linked. To fix the error, just do this for now in lieu of the video completing the function?

func _fire():

(and this may also help: GDScript reference — Godot Engine (stable) documentation in English)

spaceyjase | 2023-05-30 15:38

thank you I will test this

Laser | 2023-05-30 15:39