hi need help getting error(58,1): Expected "," or ")"

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Richard_A_Odell
var velocity = Vector2()

const GRAVITY = 35
const SPEED = 180
const SWIM_SPEED = 192
const JUMPFORCE = -1164
const SPRING = -1280
onready var is_swimming = false

func _physics_process(delta):

velocity.y = velocity.y + GRAVITY

# get Movement(left and right and jump)
if Input.is_action_pressed("move_right"):
	if is_swimming == true:
		velocity.x = SWIM_SPEED
	else:
		velocity.x = SPEED
	$Sprite.flip_h = false
if Input.is_action_pressed("move_left"):
	if is_swimming == true:
		velocity.x = -SWIM_SPEED
	else:
		velocity.x = -SPEED
	$Sprite.flip_h = true
if Input.is_action_pressed("move_up"):
	if is_swimming == true:
		velocity.y = -SWIM_SPEED
	else:
		velocity.y = -SPEED
if Input.is_action_pressed("move_down"):
	if is_swimming == true:
		velocity.y = -SWIM_SPEED
	else:
		velocity.y = SPEED
	
if Input.is_action_just_pressed("jump") and is_on_floor():
	velocity.y = JUMPFORCE
	
velocity = move_and_slide(velocity, Vector2.UP)
	
velocity.x = lerp(velocity.x, 0, 0.1)

#if player jumps on to a Spring
func _on_Spring_body_entered(body):
velocity.y = SPRING

func bounce():
velocity.y = JUMPFORCE * 0.7

func ouch():

set_modulate(Color(1, 0.3, 0.3, 0.4))
velocity.y = JUMPFORCE * 0.5

that works but i need to change func ouch(): to func ouch(var enemypos.x)
the var enemypos.x is giving me the error

:bust_in_silhouette: Reply From: SteveSmith

Function parameter names are not allowed to have a full-stop in them. Remove that and it will compile.

thank you i was putting an . in front of the x

Richard_A_Odell | 2022-11-30 04:02