YouDoNotKnowMyName Posted January 25, 2021 Share Posted January 25, 2021 Good morning everybody! I was trying to use a script that sets a quest to a stage when another quest reaches a certain stage.But it won't compile ...The script is attached to the quest that should be set, if that makes a difference ... This is the error that the compiler gives me:Compiling "NRHQ_SetQuestStageOnOtherQuestStage"... C:\Users\XXXXX\AppData\Local\Temp\PapyrusTemp\NRHQ_SetQuestStageOnOtherQuestStage.psc(17,22): no viable alternative at input '(' No output generated for NRHQ_SetQuestStageOnOtherQuestStage, compilation failed.Like almost every time, the compiler error isn't really helpful ... Here is the script: Scriptname NRHQ_SetQuestStageOnOtherQuestStage extends Quest {Sets the quest stage of a quest to a certain value when a different quest reaches a certain stage.} Quest Property QuestToSet Auto {The quest that whill get setstage'ed} Int Property StageToSet Auto {The stage to set the queststage to} Quest Property QuestToCheck Auto {The quest to check the stage of} Int Property QuestStageToCheckFor Auto {The stage nr to check for} RegisterForRemoteEvent(MyQuest, "OnSetStage") Event Quest.OnStageSet(Quest akSender, int auiStageID, int auiItemID) If (akSender == QuestToCheck) && (auiStageID == QuestStageToCheckFor) Self.UnRegisterForRemoteEvent(QuestToCheck, "OnStageSet") QuestToSet.setstage(StageToSet); Endif EndEventI have read on the CK wiki that something like this won't compile:RegisterForRemoteEvent(MyQuest, "OnDeath")That makes sense, because a quest can't "die" ....But using "OnSetStage" should work, right? I am confused .... Link to comment Share on other sites More sharing options...
DieFeM Posted January 25, 2021 Share Posted January 25, 2021 (edited) Can't call a function like this, needs to be inside of another function or event. That's a quest script so I would suggest using OnQuestInit:Event OnQuestInit() RegisterForRemoteEvent(QuestToCheck, "OnSetStage") EndEvent Edited January 25, 2021 by DieFeM Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted January 25, 2021 Author Share Posted January 25, 2021 (edited) On 1/25/2021 at 4:12 AM, DieFeM said: Can't call a function like this, needs to be inside of another function or event. That's a quest script so I would suggest using OnQuestInit:Event OnQuestInit() RegisterForRemoteEvent(QuestToCheck, "OnSetStage") EndEventYeah, but then it will only check it once (when the quest that the scirpt is attached to gets loaded). I want it to "trigger" immediatley when the "quest that should be checked" reaches the specified stage. EDIT: Nevermind, only the "register for event" will be done once, so it is all good!That is just telling the game "hey, you need to look out for this!"And that only needs to happen once, like you said ... Edited January 25, 2021 by YouDoNotKnowMyName Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted January 25, 2021 Author Share Posted January 25, 2021 Ok, I tried that, and now I am getting this: OnSetStage is not an event on quest or one if its parents WTF? Link to comment Share on other sites More sharing options...
DieFeM Posted January 25, 2021 Share Posted January 25, 2021 it is OnStageSet, not OnSetStage https://www.creationkit.com/fallout4/index.php?title=OnStageSet_-_Quest Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted January 25, 2021 Author Share Posted January 25, 2021 I still get this: OntStageSet is not an event on quest or one if its parents Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted January 25, 2021 Author Share Posted January 25, 2021 On 1/25/2021 at 4:38 AM, YouDoNotKnowMyName said: I still get this: OntStageSet is not an event on quest or one if its parentsOh ....I just re read this post and noticed I misspelled it .... I feel stupid now ... Link to comment Share on other sites More sharing options...
SKKmods Posted January 25, 2021 Share Posted January 25, 2021 That is known as the "get more sleep" error ;) Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted January 25, 2021 Author Share Posted January 25, 2021 On 1/25/2021 at 9:57 PM, SKK50 said: That is known as the "get more sleep" error :wink:Ok, I will try that ... :laugh: Link to comment Share on other sites More sharing options...
Recommended Posts