gookey Posted January 28 Share Posted January 28 I am making a quest where the courier arrives halfway through the quest and I am putting the right script character by character and I am not having any luck. This is my error code, but I am confused on how the scripts were already "defined" in the error message. But my problem is the fact that they won't compile at all. I need help. This is the script I use: Alias_Note.ForceRefTo(game.GetPlayer().PlaceAtMe(MyNote)) (WICourier as wicourierscript).AddAliasToContainer(Alias_Note) What I did to try to fix it was I had switched where the ck looks for papyrus scripts. I received this error message: Starting 1 compile threads for 1 files... Compiling "AA01_QF_TaliemFreindship_Ques_Script"... <unknown>(0,0): Unable to find flags file: TESV_Papyrus_Flags.flg C:\Games\steamapps\common\Skyrim Special Edition\Data\Scripts\Source\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(3,0): Unknown user flag Hidden No output generated for AA01_QF_TaliemFreindship_Ques_Script, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on AA01_QF_TaliemFreindship_Ques_Script Link to comment Share on other sites More sharing options...
gookey Posted January 28 Author Share Posted January 28 Update: this is the old error message that poppped up. It's popping up again and I am hopeing for a solution super soon. Link to comment Share on other sites More sharing options...
gookey Posted January 28 Author Share Posted January 28 Sorry for another reply, I need to post the error message. Error Message: Starting 1 compile threads for 1 files... Compiling "AA01_QF_TaliemFreindship_Ques_Script"... C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(23,15): script property WICourier already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(23,15): script variable ::WICourier_var already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(23,15): script property WICourier already has a get function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(23,15): script property WICourier already has a set function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(25,15): script property WICourier already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(25,15): script variable ::WICourier_var already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(25,15): script property WICourier already has a get function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(25,15): script property WICourier already has a set function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(27,15): script property WICourier already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(27,15): script variable ::WICourier_var already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(27,15): script property WICourier already has a get function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(27,15): script property WICourier already has a set function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(29,15): script property WICourier already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(29,15): script variable ::WICourier_var already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(29,15): script property WICourier already has a get function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(29,15): script property WICourier already has a set function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(33,15): script property WICourier already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(33,15): script variable ::WICourier_var already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(33,15): script property WICourier already has a get function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(33,15): script property WICourier already has a set function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(37,14): script property MyNote already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(37,14): script variable ::MyNote_var already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(37,14): script property MyNote already has a get function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(37,14): script property MyNote already has a set function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(39,14): script property MyNote already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(39,14): script variable ::MyNote_var already defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(39,14): script property MyNote already has a get function defined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\AA01_QF_TaliemFreindship_Ques_Script.psc(39,14): script property MyNote already has a set function defined No output generated for AA01_QF_TaliemFreindship_Ques_Script, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on AA01_QF_TaliemFreindship_Ques_Script Link to comment Share on other sites More sharing options...
xkkmEl Posted January 29 Share Posted January 29 The very first line of your script probably says "Script AA01_QF_TaliemFreindship_Ques_Script extends <WrongThingHere>". I have no experience with renaming quest fragment scripts as you seem to have done (adding the AA01_ prefix). I would recommend letting the CK manage that however it wants. It will regenerate these fragment scripts automatically and gets confused easily if you mess with them without going through the CK. To include an easily searchable prefix in my mods, I put the prefix on the quest name (quest AA01_TaliemFriendship) and end up with quest fragment scripts named QF_AA01_TaliemFriendship. If you are manually editing the QF script to add custom functions, I recommend you place these functions in a regular quest script and call them from the fragments through a property on the QF script that refers to your custom function script. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 29 Share Posted January 29 The Creation Kit has a fragment file prefix setting in the File dropdown preferences menu. Putting in a four character prefix will cause the CK to insert that prefix at the beginning of all of the automatically created fragment scripts. This is how gookey most likely got the prefix in their fragment script title. Short of deleting the alias / quest and starting over, I do not know how to resolve that particular issue. What I do know is that the script needs to exist before properties can be added but properties need to exist before the code can be added. Thus one needs to put in a semi-colon, compile the fragment, add the properties via the properties window, add the code as desired and re-compile. And whatever you do, do not try to delete the fragment script and add a new one. That tends to lead to issues like you've been experiencing. You could use a third-party editor like Sublime Text or Notepad++ that is set up to compile scripts to open the script that contains all the fragments for that quest, edit the section you need to edit and compile outside of the CK. That may or may not work. I have not worked with very many fragment scripts to be honest and always just started over when something like this happened. Link to comment Share on other sites More sharing options...
gookey Posted January 29 Author Share Posted January 29 I have done what you said and recreated the quest from scratch. Now I get a new scripting error messgae that is saying my new Variables are undefined. I have 2 questions. 1. What is a "variable" in the Creation Kit? 2. What does it mean by "undefined"? This is the error message I got: Starting 1 compile threads for 1 files... Compiling "QF_AA01TaliemFriendshipQuest_05051916"... C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\QF_AA01TaliemFriendshipQuest_05051916.psc(13,49): variable AA01MercNote is undefined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\QF_AA01TaliemFriendshipQuest_05051916.psc(14,5): variable WICourier is undefined C:\Games\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\QF_AA01TaliemFriendshipQuest_05051916.psc(14,15): cannot cast a none to a wicourierscript, types are incompatible No output generated for QF_AA01TaliemFriendshipQuest_05051916, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on QF_AA01TaliemFriendshipQuest_05051916 Link to comment Share on other sites More sharing options...
xkkmEl Posted January 30 Share Posted January 30 22 hours ago, IsharaMeradin said: The Creation Kit has a fragment file prefix setting in the File dropdown preferences menu. Putting in a four character prefix will cause the CK to insert that prefix at the beginning of all of the automatically created fragment scripts. This is how gookey most likely got the prefix in their fragment script title. I wish I had know about that! Mostly for the TIF files, seeing as my quest prefix works well enough for QF and SF, and I haven't touched PF. For myself, I find fragment files difficult to read. Having to open the CK to maintain them is often a real pain. I put most of my code in quest scripts; in fragments, including TIFs, I stick to one liners referring to the quest script. Makes much more explicit what each quest is about. Also avoids having dozens of properties to populate in these fragment files... they just need one pointing to its owning quest. Link to comment Share on other sites More sharing options...
xkkmEl Posted January 30 Share Posted January 30 In this context, "undefined variable" just means "undefined identifier". The compiler assumes it is meant to be a variable, but it could as well be a property or a global script, or a typo. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 30 Share Posted January 30 A variable is a text label used to identify something else within your script. This can be a property variable, a local variable, a parameter variable (i.e. data passed into a function or event), or a call to use something on another script (usually a global script like Game but could be a third-party script too). Most often an undefined variable will be referring to a property variable declaration that does not exist. In some cases, it will refer to another script that cannot be found. In your case, my best guess would be that the script code was entered, and compilation was tried but the properties had not yet been created. Since the property declarations were not on the script, it complained that the variable was not defined. Fragments are tricky to work with. The code cannot be entered and compiled without any required properties being created first. The properties cannot be created without the script existing first. Solution: Enter a semi-colon (;) and nothing else into the code field (alternatively, place a semi-colon in front of the desired code.). Compile Close the fragment record and its parent record. (i.e. if stage fragment, close the stage and the quest) Reopen the parent record and the correct fragment record. Open the properties window. Add the properties that are needed and assign them with the appropriate data. Close the properties window. Repeat #3 & #4 Add the correct code to the fragment window. Compile If all went well, it should compile without error. 1 Link to comment Share on other sites More sharing options...
gookey Posted January 30 Author Share Posted January 30 My quest and scripts now work like a charm. Thank you so much for helping me. Link to comment Share on other sites More sharing options...
Recommended Posts