I've made some changes to the Smithing perk tree and need to make sure the player has the first perk in the tree if/when they do the blacksmithing tutorial. I've managed to make the tutorial give the player the necessary perk if they don't have it.
Game.GetPlayer().AddPerk(SimpleCrafting)
SimpleCraftingAdded.Show()
but I'd like to be able to give the player a replacement perk point in the event they've already spent a perk point on this perk. The following is the script I'm trying to use but it's giving me errors still.
l133 ;give player needed perk or replacement point
l132 if Game.GetPlayer().HasPerk(SimpleCrafting) == 1
l133 then Game.AddPerkPoints(1)
l134 SimpleCraftingAlready.Show()
l135 else Game.GetPlayer().AddPerk(SimpleCrafting)
l136 SimpleCraftingAdded.Show()
l137 endif
I get an error at lines 133 and 135. The errors are pasted below.
Starting 1 compile threads for 1 files...
Compiling "QF_TutorialBlacksmithing_00105385"...
C:\Steam\ . . . \QF_TutorialBlacksmithing_00105385.psc(169,14): required (...)+ loop did not match anything at input '.'
C:\Steam\. . . \QF_TutorialBlacksmithing_00105385.psc(171,10): required (...)+ loop did not match anything at input 'Game'
No output generated for QF_TutorialBlacksmithing_00105385, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on QF_TutorialBlacksmithing_00105385
Here's where I got the AddPerkPoints information:
http://www.creationkit.com/AddPerkPoints_-_Game