Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Insanee |
Hi, i have a problem, i’m making a position list that uses linked nodes, the thing is that if define the static type of a parameter with the same type of the class that is implementing the function gdScript will take it as cyclic reference
extends Node
class_name NodoPL
var element
var nodo_previo
var nodo_siguiente
func _init(e, prev: NodoPL, next: NodoPL):
element = e
nodo_previo = prev
nodo_siguiente = next
this wont cause any error but the class that preloads NodoPL will say
couldn’t fully preload the script, posible cyclic reference or compliation error. use load() if a cyclic reference is intended
if i use load is still have the error but when i use the class for static typing