How can I fix this error: unident does not match any outer indent level?

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

This is the script…

extends Node

export (PackedScene) var Mob
var score

func _ready():
$HUD.show_message(“Get Ready”)
func _on_Player_hit():
pass # Replace with function body.

func game_over():

func new_game():
score = 0

func _on_MobTimer_timeout():
# Choose a random location on Path2D.
$MobPath/MobSpawnLocation.offset = randi()
# Create a Mob instance and add it to the scene.
var mob = Mob.instance()
# Set the mob’s direction perpendicular to the path direction.
var direction = $MobPath/MobSpawnLocation.rotation + PI / 2
# Set the mob’s position to a random location.
mob.position = $MobPath/MobSpawnLocation.position
# Add some randomness to the direction.
direction += rand_range(-PI / 4, PI / 4)
mob.rotation = direction
# Set the velocity (speed & direction).
mob.linear_velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0)
mob.linear_velocity = mob.linear_velocity.rotated(direction)

func _on_ScoreTimer_timeout():
score += 1

func _on_StartTimer_timeout():

:bust_in_silhouette: Reply From: alshahriorhasan

Test it out your script


David8184 | 2021-07-11 20:57

My pleasure . . . .

alshahriorhasan | 2021-07-11 20:59