Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Error cs1061

$
0
0
using System.Collections.Generic; public class StatMod : BaseStat { private List _mods; private int _modVal; public void ModdingStat() { _mods = new List(); _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.

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>