'self.has_method("Use")' returns true but 'self.Use' Throws an error

Hello everyone,

I’m making a modular weapon system and I’m trying to let every weapon inherit the same functions using a custom class. However, when I try to reference a method on the child it gives an error even though self.has_method("Use") returns true

func On_Use():
	if self.Equipped and self.has_method("Use"):
		print(self.Use()) <-- This throws an error

The error in question:

Function "Use()" not found in base self

lmk if you need more info, Thanks :melting_face:

Is the weapon script extending from the base class?

his code looks like here Unable to reference the "root" on the super super class function he post few days ago

i believe the Use method is on the extended class script? if that’s the case, try super.Use()

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.