I made a class_name
but when I want to create an instance of it, it gives me these errors:
built-in:17 - Parse Error: The class "Pokemon" couldn't be fully loaded (script error or cyclic dependency)
modules/gdscript/gdscript.cpp:599 - Method failed. Returning: ERR_PARSE_ERROR
this is the code for the class_name
:
extends TextureButton
class_name Pokemon
var pokemon_name = ""
var stage = ""
var evolution_stage = ""
var health = 0
var type = ""
var attacks = []
func _init(var p_name, var s, var e_stage, var h, var t, var a):
pokemon_name = p_name
stage = s
evolution_stage = e_stage
health = h
type = t
attacks = a