I started to teach myself scripting tonight, but a few of the scripts I'm trying to write will not compile. I lack the expertise to really figure out why they're not working, so I hope someone here can lend a hand.
What I'm essentially trying to do is kill an NPC well before the player interacts with her and, upon taking an item out of her inventory, she's brought back to life. For reference, the NPC is "darksunilusadead" and the item is "darksunspikes"
I put this script on the NPC:
Scriptname darksunkillilusa extends ObjectReference Int Property darksunkill Auto if (Game.Getdarksunilusadead().GetItemCount(darksunspikes) == 1) darksunilusadead.killendIf
Errors:
Compiling "darksunkillilusa"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\darksunkillilusa.psc(4,1): missing EOF at 'if'
No output generated for darksunkillilusa, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on darksunkillilusa
And this script on the item:
Scriptname darksunilusarevival extends ObjectReference Int Property NewProperty Auto Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer)if (newContainer == Game.GetPlayer()) DarksunIlusaDead().resurrectVampireChangeFX.Play(DarksunIlusaDead(), 3.0)endifEndEvent
Errors:
Compiling "darksunilusarevival"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\darksunilusarevival.psc(6,16): DarksunIlusaDead is not a function or does not exist
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\darksunilusarevival.psc(6,35): none is not a known user-defined type
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\darksunilusarevival.psc(7,1): variable VampireChangeFX is undefined
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\darksunilusarevival.psc(7,22): DarksunIlusaDead is not a function or does not exist
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\darksunilusarevival.psc(7,17): none is not a known user-defined type
No output generated for darksunilusarevival, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on darksunilusarevival
Thanks for looking!