"Parser Error: Script not fully loaded (cyclic preload?) : res://scenes/global.gd"

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

I wanted to add a singleton called “global.gd”. Added it to the autoload tab, but when i run my game i get this error:

“Parser Error: Script not fully loaded (cyclic preload?) : res://scenes/global.gd”

I don’t know why, here’s the code thats inside the global script

extends "res://scenes/global.gd"
func _ready():
    var clicks = 0;

If i write this variable outside the ready function it happens the same thing

:bust_in_silhouette: Reply From: hilfazer

Looks like You have a script that inherits itself. Try inheriting Node:

extends Node


func _ready():
    var clicks = 0