I was following a tutorial on the godot website and came across this error
This is the code so far:
extends Node
export(PackedScene) var mob_scene
var score
func ready():
randomize()
newgame()
func game_over():
$ScoreTimer.stop()
$MobTimer.stop()
func new_game():
score = 0
$Player.start($StartPosition.position)
$StartTimer.start()
func onStartTimer_timeout():
$MobTimer.start()
$ScoreTimer.start()
func onScoreTimer_timeout():
score += 1
func onMobTimertimeout():
var mobspawnlocation = getnode("MobPath/MobSpawnLocation");
mobspawnlocation.offset = randi()
var mob = mob_scene.instance()
add_child(mob)
var direction = mob_spawn_location.positon + PI / 2 #This is where the error
mob.position = mob_spawn_location.position #occurs.
direction += rand_range(-PI / 4, PI / 4)
mob.rotation = direction
var velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0)
mob.linear_velocity = velocity.rotated(direction)