taryl80 Posted May 23, 2020 Share Posted May 23, 2020 Hey Guys I have write a donation script for a Orphanage in a mod I working currently on. The problem is, it doesn't work. Can someone help me out here? If it would have work, the player should have lost 100 caps and gain a temporary perk for 2 hours or so. My Error message is: "C:\(...)\Orphanage.psc(8,13): no viable alternative at input '.' No output generated for Orphanage, compilation failed." Steps I have done:-I have attach the script on the line, where the npcs thanks the player, for his donation. The Script looks like this: Scriptname Orphanage extends TopicInfoReferenceAlias Property OrphanageALIAS Auto ConstMiscObject Property Caps001 Auto ConstActor Property Player Auto ConstSPELL Property OrphanageSpell Auto ConstOrphanageSpell.Cast(Player, Player)Player.removeitem(Caps001, 100) Thanks already to everyone who can help me. Link to comment Share on other sites More sharing options...
SKKmods Posted May 23, 2020 Share Posted May 23, 2020 The Script does not have a function or event wrapping the actions. Typically they use; Event OnBegin(ObjectReference akSpeakerRef, bool abHasBeenSaid)...EndEvent OR Event OnEnd(ObjectReference akSpeakerRef, bool abHasBeenSaid)...EndEvent Look at OpenInventoryInfoScript and such for guidance. Link to comment Share on other sites More sharing options...
taryl80 Posted May 23, 2020 Author Share Posted May 23, 2020 (edited) Thank you so much SKK50! It has worked! For everyone with a similar question who maybe look later in this thread, I post here now the script, that need to be attached on your donation giving line in the quest: ----------------------------Scriptname Orphanage extends TopicInfoReferenceAlias Property OrphanageALIAS Auto ConstMiscObject Property Caps001 Auto ConstActor Property Player Auto ConstSPELL Property OrphanageSpell Auto ConstEvent OnEnd(ObjectReference akSpeakerRef, bool abHasBeenSaid) debug.trace(self + " OnEnd " + akSpeakerRef)OrphanageSpell.Cast(Player, Player)Player.removeitem(Caps001, 20)endEvent---------------------------- The "Orphanage" names need to be changed of course, to the name of the new aliases and so on. Edited May 23, 2020 by taryl80 Link to comment Share on other sites More sharing options...
Recommended Posts