unexpected token if

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By UsturaAhmet50
if Input.is_action_just_pressed("ui_focus_next")
	var fireball = FIREBALL.instance()
	get_parent().add_child(fireball)

Please use the code formatting button when posting code. Otherwise your post is unreadable. I’ve edited it to fix the problem.

As for your question, it’s impossible to answer without more context. Where in your code is this snippet? Please post the whole script, or at least the function that contains it.

kidscancode | 2019-01-27 20:20

You appear to be missing the “:”

if Input.is_action_just_pressed("ui_focus_next"):
    var fireball = FIREBALL.instance()
    get_parent().add_child(fireball

p7f | 2019-01-27 21:13