Hack and slash object reference Help?

Hey Guys i need some help i am currently following the tutorial series and i have run into a little bug … i have tried to completly recode the whole classes but no such luck

Heres the scenario

when i use the code

GetVital((int)VitalName.Health).Addmodifier(new ModifyingAttribute(GetPrimaryAttribute((int)AttributeName.Constituion), .5f));

It Works Fine but When i change “Health” To “Mana” I Get The Error

NullReferenceException: Object reference not set to an instance of an object
CharecterGeneration.Displayvitals () (at Assets/Standard Assets/My Scripts/CharecterGeneration.cs:66)
CharecterGeneration.OnGUI () (at Assets/Standard Assets/My Scripts/CharecterGeneration.cs:35)

and

NullReferenceException: Object reference not set to an instance of an object
BaseCharecter.StatUpdate () (at Assets/Standard Assets/My Scripts/BaseCharecter.cs:113)
CharecterGeneration.Update () (at Assets/Standard Assets/My Scripts/CharecterGeneration.cs:27)

Spamming Up The Command Page!

Please Help

if you need my project file please request it i really need this

/ \ | | | Hey Admins, didn't we get rid of this guy the other day?

1 Answer

1

Bump, Still need this.

I'm afraid you still haven't provided enough information for us to help you with this! For example, how does the GetVital code even work? Is there anything actually coded for 'Mana'? Or does it only do health? There could be any number of problems here. We're not all familiar with the specific tutorial you are doing here!