Script Question: Sitting progresses a quest

Post » Thu Dec 20, 2012 8:27 pm

This is my first foray into the Construction Kit with any real goal in mind. My goal is to make a more interesting courting experience that leads up to marriage rather than just a "Let's go get married!" "Ok!". As part of this, I want the quest stage to be advanced when the player sits at a specific chair. I've duplicated an existing chair and placed it in the world, renaming it so it's unique. I then flicked over to Notepadd++ to write a script that will change the current quest's stage when the player activates the chair. This is what I've got:

Scriptname CourtshipMeet01Script extends ObjectReference  {Advances quest when player sits at the bar.}Quest Property CourtshipMeetQuest  Auto  Event OnActivate(ObjectReference CourtshipChairPlayer)	if GetOwningQuest().GetStage < 20		if GetOwningQuest().GetStage > 10			GetOwningQuest().SetObjectiveDisplayed(20)			GetOwningQuest().SetStage(20)		EndIf	EndIfEndEvent

When I try to compile it in Notepad++ it has the following errors:


D:\ProgramFiles\Notepad++>"D:\Games\Steam\steamapps\common\Skyrim\Papyrus compil
er\PapyrusCompiler.exe" "CourtshipSitSCRIPT.psc" -f="TESV_Papyrus_Flags.flg" -i=
"D:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source" -o="D:\Games\Steam\
steamapps\common\Skyrim\Data\Scripts"
Starting 1 compile threads for 1 files...
Compiling "CourtshipSitSCRIPT"...
D:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\CourtshipSitSCRIPT.ps
c(14,11): no viable alternative at input 'CourtshipMeet01'
D:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\CourtshipSitSCRIPT.ps
c(0,0): filename does not match script name: courtshipmeet01script
No output generated for CourtshipSitSCRIPT.psc, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on CourtshipSitSCRIPT.psc

D:\ProgramFiles\Notepad++>pause
Press any key to continue . . .


Back when I was doing programming for university, understanding the error messages was always the hardest part for me, so perhaps I would know where to go from here or how to get it to work if I understood what the output was. So I guess, if anyone can explain what the various error messages likely relate to, and if I'm going about making the chair activation progress the quest the right way that would be really helpful, thanks!
User avatar
Multi Multi
 
Posts: 3382
Joined: Mon Sep 18, 2006 4:07 pm

Return to V - Skyrim