How do I fix Expected end of statement after expression, found "Literal" instead

Godot Version

4

Question

how do I fix Expected end of statement after expression, found “Literal” instead

func dash():
	if Input.is_action_just_pressed("roll") and canDash:
		speed = dashDirection.normalized() * 2000
		canDash = false
		dashing = true
		await get_tree().create_timer(1)"timer"
		dashing = false
		canDash = true

Look at your timer line, and it will hit you.

Should be
await get_tree().create_timer(1).timeout

it worked thx

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.