I'm trying to add a spell to the player's spellbook once they take a particular perk. I created the following script:
Scriptname mystyAddSpell extends Perk
{Adds a spell to the player's spellbook}
SPELL Property learnedSpell Auto
Game.GetPlayer().AddSpell(learnedSpell)
and assigned the property to the spell I want to the player to learn. However, the script does not compile and I don't understand the error message:
no viable alternative at input '.'
From what I can tell, it doesn't like the Game.GetPlayer() bit. I tried adding an actor property to use as a reference instead, but that had errors as well and wouldn't let me assign the property value. What gives?

