Iyeru Posted November 8, 2016 Posted November 8, 2016 Just wondering what's wrong with this script: Scriptname CRSoulHouseQuest1CheckIfWaited extends Quest Hidden Function CRSoulUpdaterOne() RegisterForUpdateGameTime(8.0) endFunction if CRSoulHouseQuest1.getStage() == 0 Event OnUpdateGameTime() UnregisterForUpdateGameTime() CRSoulHouseQuest1.setStage() = 900 endEvent endIf Basically, the game is checking every 8 in game hours after this quest has started, whether or not the player didn't achieve a specific goal or not (IE: hasn't advanced the quest past stage 0.) But the CK gives this error: Starting 1 compile threads for 1 files... Compiling "CRSoulHouseQuest1CheckIfWaited"... C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\CRSoulHouseQuest1CheckIfWaited.psc(7,0): missing EOF at 'if' No output generated for CRSoulHouseQuest1CheckIfWaited, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on CRSoulHouseQuest1CheckIfWaited
Slammer64 Posted November 8, 2016 Posted November 8, 2016 As I don't have the rest of your files to work with, try this instead: Scriptname CRSoulHouseQuest1CheckIfWaited extends Quest Hidden Function CRSoulUpdaterOne() RegisterForUpdateGameTime(8.0) endFunction Event OnUpdateGameTime() if CRSoulHouseQuest1.getStage() == 0 UnregisterForUpdateGameTime() CRSoulHouseQuest1.setStage() == 900 endif endEvent
Prometeus5879 Posted November 8, 2016 Posted November 8, 2016 I have no experience in scripting in Skyrim but I'm looking a t it from a developers point. This line here CRSoulHouseQuest1.setStage() = 900 looks odd to me as in other languagues it would assign a valuen to a function call instead of calling a function with a value like in CRSoulHouseQuest1.setStage(900) Dunno if that's the problem, but you never know.
Iyeru Posted November 8, 2016 Author Posted November 8, 2016 I have no experience in scripting in Skyrim but I'm looking a t it from a developers point. This line here CRSoulHouseQuest1.setStage() = 900 looks odd to me as in other languagues it would assign a valuen to a function call instead of calling a function with a value like in CRSoulHouseQuest1.setStage(900) Dunno if that's the problem, but you never know. Yours was the problem, now I get these errors: Starting 1 compile threads for 1 files... Compiling "CRSoulHouseQuest1CheckIfWaited"... C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\CRSoulHouseQuest1CheckIfWaited.psc(8,8): variable CRSoulHouseQuest1 is undefined C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\CRSoulHouseQuest1CheckIfWaited.psc(8,26): none is not a known user-defined type C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\CRSoulHouseQuest1CheckIfWaited.psc(8,37): cannot compare a none to a int (cast missing or types unrelated) C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\CRSoulHouseQuest1CheckIfWaited.psc(10,10): variable CRSoulHouseQuest1 is undefined C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\CRSoulHouseQuest1CheckIfWaited.psc(10,28): none is not a known user-defined type No output generated for CRSoulHouseQuest1CheckIfWaited, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on CRSoulHouseQuest1CheckIfWaited Serious note, the script is inside the quest CRSoulHouseQuest1, so it can't be undefined (since it knows that's the quest it's referencing to, and thusit isn't undefined.) Should I set it to parent.getStage and parent.setStage instead? Since the script is running inside the quest, and not alone.
Slammer64 Posted November 8, 2016 Posted November 8, 2016 Well, I've exhausted my limited knowledge of Papyrus, maybe one of the real scripters can help you out.
Guest Posted November 8, 2016 Posted November 8, 2016 Scriptname CRSoulHouseQuest1CheckIfWaited extends Quest Hidden Quest Property CRSoulHouseQuest1 Auto Function CRSoulUpdaterOne() RegisterForUpdateGameTime(8.0) endFunction Event OnUpdateGameTime() if CRSoulHouseQuest1.getStage() == 0 UnregisterForUpdateGameTime() CRSoulHouseQuest1.setStage(900) endIf EndEvent
Iyeru Posted November 8, 2016 Author Posted November 8, 2016 Scriptname CRSoulHouseQuest1CheckIfWaited extends Quest Hidden Quest Property CRSoulHouseQuest1 Auto Function CRSoulUpdaterOne() RegisterForUpdateGameTime(8.0) endFunction Event OnUpdate() if CRSoulHouseQuest1.getStage() == 0 Event OnUpdateGameTime() UnregisterForUpdateGameTime() CRSoulHouseQuest1.setStage(900) endEvent endIf EndEvent Yours gives the following error: Starting 1 compile threads for 1 files... Compiling "CRSoulHouseQuest1CheckIfWaited"... C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\CRSoulHouseQuest1CheckIfWaited.psc(13,5): mismatched input 'Event' expecting ENDIF No output generated for CRSoulHouseQuest1CheckIfWaited, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on CRSoulHouseQuest1CheckIfWaited
Guest Posted November 8, 2016 Posted November 8, 2016 ... Yeah, I didn't see it. Fixed in my previous post.
Iyeru Posted November 8, 2016 Author Posted November 8, 2016 ... Yeah, I didn't see it. Fixed in my previous post. I kind of figured it had something to do with not getting the Quest ID and defining it in the script. I just didn't figure out how to do that. Thank you though, the script compiles now, now all I have to do is write the rest of the stages/etc. and test it. I've never done things so complex as these, prior, I only did NPC followers, changing leveled states, etc. But making a house and attaching a quest to it like this is really involving. I'm glad that, even with all of its bugs, the Creation Kit exists. I couldn't imagine how you'd mod this otherwise.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.