Jump to content

Script help


BigTody

Recommended Posts

Hey there, I've been trying to create a spell that allows you to convert unspent dragon souls into freely disposable perk points.

Now I'm fairly new to papyrus so I'm probably making some really stupid mistake? Apparently it is the AddPerkPoints function that is causing the trouble, which seems odd to me as I followed the exact example of http://www.creationkit.com/AddPerkPoints_-_Game.

 

Anyways... these are the errors I get when I try to compile the script:

c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\zzTEST.psc(7,7): AddPerkPoints is not a function or does not exist

c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\zzTEST.psc(7,7): cannot call the member function AddPerkPoints alone or on a type, must call it on a variable

No output generated for zzTEST, compilation failed.

 

And this is the script:

Scriptname zzTEST extends activemagiceffect  

Event OnEffectFinish(Actor akTarget, Actor akCaster)
int temp1 = akTarget.GetAV("DragonSouls") as int
if (temp1 > 4)
	Game.GetPlayer().ModActorValue("DragonSouls", -5.0)
	Game.AddPerkPoints(5)
	Debug.Notification("Succes!")
else
	Debug.Notification("Not enough souls.")
endIf
endEvent

Link to comment
Share on other sites

It should be, I'm running Skyrim with some mods that are only compatible with 1.8. I checked the Creation Kit's update properties aswell and "always keep this tool up to date" was enabled.

I suppose I'm gonna try and reinstall the Creation Kit.

 

Thank you for the reply Ghaunadaur

 

EDIT: Reinstalling did the trick, thank you again Ghauna

Edited by BigTody
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...