Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | cocopioche |
export (int) var life
export (String) var ressource
var inventory = Gamemanager.inventorie
func _physics_process(delta: float) → void:
die()
func die():
if life <= 0:
inventory.ressource += 1
queue_free()
it give thir error Invalid get index ‘ressource’ (on base: ‘Node2D (gamemanager.gd)’).