This is the script i have so far:
Float Function CalculatePercentageOf(Float fPercentage, Float fValue) Float c = (fPercentage / 100.0) As Float Return (c * fValue) As FloatEndFunctionFloat Function CalculatePercentageOfValue(Actor akTarget, String sAttribute, Bool bBaseValue, Float fPercentage) Float fAttributeValue = http://forums.bethsoft.com/topic/1359834-percentage-of-health-and-mana-instead-of-a-set-value/0.0 If bBaseValue fAttributeValue = akTarget.GetBaseActorValue(sAttribute) As Float Else fAttributeValue = akTarget.GetActorValue(sAttribute) As Float EndIf Return CalculatePercentageOf(fPercentage, fAttributeValue)EndFunctionfloat fNewMagicka = CalculatePercentageOfValue(player,"Magicka", true, 100.0)player.DamageAV("Magicka",fNewMagicka)
And this is the error message:
d:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CVORemoveMagika.psc(18,20): no viable alternative at input 'CalculatePercentageOfValue'd:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CVORemoveMagika.psc(18,46): required (...)+ loop did not match anything at input '('d:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CVORemoveMagika.psc(18,6): Unknown user flag CalculatePercentageOfValue