Error cs1061

using System.Collections.Generic;

public class StatMod : BaseStat {
	private List<modAtt> _mods;
	private int _modVal;

	public void ModdingStat() {
		_mods = new List<modAtt>();
		_modVal = 0;

	public void addMod( modAtt mod) {
		_mods.Add (mod);

	private void calcModVal() {
		_modVal = 0;

		if (_mods.Count > 0) 
			foreach( modAtt att in _mods)
				_modVal += (int)(att.AdjustVal() * att.ratio);	//Error in this line

public struct modAtt {
	public Attribute att;
	public float ratio;

The error, exactly, is showing up as
Type modAtt' does not contain a definition for AdjustVal’ and no extension method AdjustVal' of type modAtt’ could be found (are you missing a using directive or an assembly reference?)

AdjustVal() is found in the script BaseStat that this one calls upon, and modAtt is only found in this one. AdjustVal is set as,

public int AdjustVal() {
		return _baseVal + _buffVal;

If that’s needed, I don’t know what other information is relevant as that’s all there is to the error I see, thank you for your time and any help you can provide.

AdjustVal is not a method that exists on your struct that defines two fields in modAtt. If it’s part of your base class called “BaseStat”, then just call the method in your class since it derives from BaseStat with no overrides.


_modVal += (int)(att.AdjustVal() * att.ratio);    // modAtt doesn't have a method called AdjustVal()

Correct(if calling base class method, base is not needed but added for completeness):

_modVal += (int)(base.AdjustVal() * att.ratio);    //Error in this line