Is there any way to fix this input error?

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

I’m working on a selection screen similar to NBA 2K and Madden NFL

onready var challengerBoxerBase = $ChallengerBoxerBase
onready var hostBoxerBase = $HostBoxerBase


# Called when the node enters the scene tree for the first time.
func _ready():
	
	if Globals.playerOne == challengerBoxerBase:
		challengerBoxerBase._process()
		if is_action_just_pressed("ui_right"):
			challengerBoxerBase == null
	
	if Globals.playerOne == hostBoxerBase:
		hostBoxerBase._process()
		if is_action_just_pressed("ui_left"):
			challengerBoxerBase == null
				
	if Globals.playerOne == null:
		hostBoxerBase._process()
		if is_action_just_pressed("ui_left"):
				Globals.playerOne == challengerBoxerBase
		if is_action_just_pressed("ui_right"):
				Globals.playerOne == hostBoxerBase
			
	if Globals.playerTwo == null:
		challengerBoxerBase._process()
		if is_action_just_pressed("ui_right"):
			Globals.playerTwo == hostBoxerBase
		if is_action_just_pressed("ui_left"):
			Globals.playerTwo == challengerBoxerBase
			
	if Globals.playerTwo == challengerBoxerBase:
		challengerBoxerBase._process()
		if is_action_just_pressed("ui_right"):
			challengerBoxerBase == null
	
	if Globals.playerTwo == hostBoxerBase:
		hostBoxerBase._process()
		if is_action_just_pressed("ui_left"):
			challengerBoxerBase == null
	
	if is_action_just_pressed("ui_select"):
		get_tree().change_scene("res://Fight.tscn")
		challengerBoxerBase.current_character
		hostBoxerBase.current_character
	
	pass # Replace with function body.

res://screens/Setup.gd:45 - Parse Error: The method “is_action_just_pressed” isn’t declared in the current class.

What’s causing this?

:bust_in_silhouette: Reply From: timothybrentwood

is_action_just_pressed() is a member function of the Input class. You need to change all of your is_action_just_pressed() calls to Input.is_action_just_pressed().

You’re also doing all of that inside of _ready() when it looks like you want to be doing it inside of _process()