LadySagitar Posted May 16, 2018 Share Posted May 16, 2018 I made a follower with a custom framework using the guidelines I found on this website: Then I used this video to set up my follower to ride with the player: The mod this video refers to was made for Skyrim:My mod is for Skyrim SE. I'm not sure if that's where my trouble is coming from. If following the video, I get to 21:24 where the author is writing a script fragment on a scene inside the follower's quest. When I attempt the script fragment as indicated, I get this error string: Starting 1 compile threads for 1 files...Compiling "SF__GallusPlaysFlute_0200FB27"...C:\Program Files (x86)\Steam\SteamApps\common\Skyrim Special Edition\Data\Scripts\Source\temp\SF__GallusPlaysFlute_0200FB27.psc(8,1): variable aaSagitar_GallusSagitarQuest is undefinedC:\Program Files (x86)\Steam\SteamApps\common\Skyrim Special Edition\Data\Scripts\Source\temp\SF__GallusPlaysFlute_0200FB27.psc(8,30): cannot cast a none to a _gallusforcegreetinitial, types are incompatibleC:\Program Files (x86)\Steam\SteamApps\common\Skyrim Special Edition\Data\Scripts\Source\temp\SF__GallusPlaysFlute_0200FB27.psc(12,1): variable aaSagitar_GallusSagitarQuest is undefinedC:\Program Files (x86)\Steam\SteamApps\common\Skyrim Special Edition\Data\Scripts\Source\temp\SF__GallusPlaysFlute_0200FB27.psc(12,30): cannot cast a none to a _gallusforcegreetinitial, types are incompatibleNo output generated for SF__GallusPlaysFlute_0200FB27, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on SF__GallusPlaysFlute_0200FB27 I'm not sure what I'm doing incorrectly. Any help is appreciated. Thanks! Link to comment Share on other sites More sharing options...
Deleted3897072User Posted May 17, 2018 Share Posted May 17, 2018 Maybe a missing property? It might help if you copy and paste your complete script as it stands, so that we can see it. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 17, 2018 Share Posted May 17, 2018 The screenshot might show everything we need but as an attachment it is too small. Clicking on it doesn't make it much bigger. Either post the script fragment code along with a fresh compiler errorOr figure out how to re-post the screenshot so that it expands to full size when clicked on. Link to comment Share on other sites More sharing options...
LadySagitar Posted May 19, 2018 Author Share Posted May 19, 2018 Thanks for replying. The screenshot is a code fragment: Quest --> Scenes Tab --> Scene titled _GallusPlaysFlute Completion Condition on phase 1 of the scene The papyrus fragment is: (aaSagitar_GallusSagitarQuest AS _GallusForcegreetInitial).SummonHorse() Utility.Wait(0.5) (aaSagitar_GallusSagitarQuest AS _GallusForcegreetInitial).Stop_GallusPlaysFluteScene() Link to comment Share on other sites More sharing options...
LadySagitar Posted May 19, 2018 Author Share Posted May 19, 2018 (edited) The _GallusForcegreetInitial script: Scriptname _GallusForcegreetInitial extends Quest Quest property aaSagitar_GallusSagitarQuest auto Actor Property aaSagitar_SilverwindHorse auto Actor Property _GallusCompanionForUpdate Auto GlobalVariable Property _GallusHorseRidingVar Auto Bool Property Gallus_IsTryingToRideHorse Auto Scene Property _GallusPlaysFlute Auto Event OnUpdateGameTime();Debug.MessageBox("Test")If (_GallusCompanionForUpdate == None)Debug.MessageBox("We have a Problem")UnregisterForUpdateGameTime()Actor Player = Game.GetPlayer() _GallusCompanionForUpdate.EvaluatePackage() If (Player.IsOnMount() && !(_GallusCompanionForUpdate.IsOnMount())) If (!(Gallus_IsTryingToRideHorse))_GallusPlaysFlute.ForceStart()EndIf Gallus_IsTryingToRideHorse = true ElseIf (Player.IsOnMount() && _GallusCompanionForUpdate.IsOnMount()) Gallus_IsTryingToRideHorse = false;ElseIf (_GallusCompanionForUpdate.IsOnMount() && !(Player.IsOnMount()))_GallusHorseRidingVar.SetValue(1) aaSagitar_SilverwindHorse.EvaluatePackage() _GallusCompanionForUpdate.EvaluatePackage() If (_GallusCompanionForUpdate.IsOnMount())_GallusCompanionForUpdate.Dismount()EndIf Gallus_IsTryingToRideHorse = false;Else Gallus_IsTryingToRideHorse = false;EndIfElse EndIfEndEvent ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function SummonHorse()aaSagitar_SilverwindHorse.MoveTo(_GallusCompanionForUpdate)aaSagitar_SilverwindHorse.EvaluatePackage()_GallusCompanionForUpdate.EvaluatePackage()Utility.Wait(3.0)EndFunction Function Stop_GallusPlaysFluteScene()If(_GallusPlaysFlute.IsPlaying())_GallusPlaysFlute.Stop()EndIfEndFunction Arron Dominion's original script from the Clara Goldspright mod: scriptName Clara_ForceGreetInitialIIntro extends Quest ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;This property represents the Follower 'Quest';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Quest property Clara_Followquest auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;This property represents Mia in the world;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Actor Property Clara_HorseMia Auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;This property represents the Companion;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Actor Property Clara_ClaraCompanionForUpdate Auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;This property represents if Clara is riding or not - This way it can be used in various checks elsewhere;NOTE: This global allows for you to make dialogue that will only occur if she was riding if you wanted To; Meaning of Values:; 1 - Not Riding; 2 - Riding;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GlobalVariable Property Clara_HorseRidingVar Auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Check to see if she is trying to mount Mia;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Bool Property Clara_IsSheTryingToRideMia Auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;This property represents the scene where Clara will give a whistle, and the horse will then appear;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Scene Property Clara_Followquest_HorseWhistle Auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;These are the properties associated with the Cape/Hood Logic;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WorldSpace Property Interiors Auto WorldSpace Property MarkarthWorld Auto WorldSpace Property RiftenWorld Auto WorldSpace Property SolitudeWorld Auto WorldSpace Property WindhelmWorld Auto WorldSpace Property WhiterunWorld Auto Armor Property Claras_Backpack Auto Armor Property Claras_CapeHoodDown Auto Armor Property Claras_CapeHoodUp Auto Armor Property Claras_Gloves Auto Cell Property RiftenHoneyside Auto Cell Property MarkarthVlindrelHall Auto Cell Property SolitudeProudspireManor Auto Cell Property WindhelmHjerim Auto Cell Property WhiterunBreezehome Auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Despite this name, this contains all of the potions or poisons that are possible to give; Index 0 - Health Potion;Index 1 - Frenzy Poison;Index 2 - Magicka Potion;Index 3 - Stamina Potion;Index 4 - Lingering Health Poison;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Potion[] Property HealthPotions Auto ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;This is a setting that dialogue will use for determining if the cloak should be used or not;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GlobalVariable Property Clara_CloakUse Auto Event OnInit() Clara_Followquest.setstage(5) RegisterForUpdateGameTime(0.0245)EndEvent ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Event: OnUpdateGameTime;Purpose: This event will tick/trigger ~every 15 in-game minutes.; It will go through a variety of checks for NPC dynamic behavior;;Parameters: None - UpdateGameTime is just a timer for the in-game clock;Returns: Events don't return anything;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Event OnUpdateGameTime();Debug.MessageBox("Test")If (Clara_ClaraCompanionForUpdate == None)Debug.MessageBox("We have a Problem");We have to unregister for updates. This check was done to make sure the game still had a NPC to work withUnregisterForUpdateGameTime()ElseIf ((Clara_Followquest.GetStage()== 10) || (Clara_Followquest.GetState() > 10));Perform check for Clara on Accessories logic int hoodValue = ShouldWearHood(Clara_ClaraCompanionForUpdate) int cloakLogic = Clara_CloakUse.GetValue() as INT If (cloakLogic < 2)If (hoodValue == 0);No Hood Time Clara_ClaraCompanionForUpdate.RemoveItem(Claras_Backpack)Clara_ClaraCompanionForUpdate.RemoveItem(Claras_CapeHoodDown)Clara_ClaraCompanionForUpdate.RemoveItem(Claras_CapeHoodUp)Clara_ClaraCompanionForUpdate.RemoveItem(Claras_Gloves)ElseIf (hoodValue == 1);Handle Backpack firstIf (!(Clara_ClaraCompanionForUpdate.IsEquipped(Claras_Backpack)));We need to add the hood and equipClara_ClaraCompanionForUpdate.AddItem(Claras_Backpack)Clara_ClaraCompanionForUpdate.EquipItem(Claras_Backpack)EndIf ;Handle Cape Hood Down nextIf (!(Clara_ClaraCompanionForUpdate.IsEquipped(Claras_CapeHoodDown)))Clara_ClaraCompanionForUpdate.AddItem(Claras_CapeHoodDown)Clara_ClaraCompanionForUpdate.EquipItem(Claras_CapeHoodDown)EndIf ;Handle GlovesIf (!(Clara_ClaraCompanionForUpdate.IsEquipped(Claras_Gloves)))Clara_ClaraCompanionForUpdate.AddItem(Claras_Gloves)Clara_ClaraCompanionForUpdate.EquipItem(Claras_Gloves)EndIf ;Remove the hooded versionClara_ClaraCompanionForUpdate.RemoveItem(Claras_CapeHoodUp)ElseIf (hoodValue == 2);Handle Backpack firstIf (!(Clara_ClaraCompanionForUpdate.IsEquipped(Claras_Backpack)));We need to add the hood and equipClara_ClaraCompanionForUpdate.AddItem(Claras_Backpack)Clara_ClaraCompanionForUpdate.EquipItem(Claras_Backpack)EndIf ;Check Cape Hood UpIf (!(Clara_ClaraCompanionForUpdate.IsEquipped(Claras_CapeHoodUp)));We need to add the hood and equipClara_ClaraCompanionForUpdate.AddItem(Claras_CapeHoodUp)Clara_ClaraCompanionForUpdate.EquipItem(Claras_CapeHoodUp)EndIf ;Handle GlovesIf (!(Clara_ClaraCompanionForUpdate.IsEquipped(Claras_Gloves)))Clara_ClaraCompanionForUpdate.AddItem(Claras_Gloves)Clara_ClaraCompanionForUpdate.EquipItem(Claras_Gloves)EndIf ;Remove the non-hooded versionClara_ClaraCompanionForUpdate.RemoveItem(Claras_CapeHoodDown)Else;We are just eating the -1 for the Do Nothing callEndIfEndIf ;Perform horse checksActor Player = Game.GetPlayer() ;Clara needs a sanity check hereClara_ClaraCompanionForUpdate.EvaluatePackage() ;Debug.MessageBox("HERE I GO!") If (Player.IsOnMount() && !(Clara_ClaraCompanionForUpdate.IsOnMount()));Scenario 1 - Player is on a horse, but Clara is Not ;In this scenario, we want to force the horse mount whistle;This will be done via a forced Scene If (!(Clara_IsSheTryingToRideMia))Clara_Followquest_HorseWhistle.ForceStart()EndIf ;So this doesn't happen over and overClara_IsSheTryingToRideMia = true ElseIf (Player.IsOnMount() && Clara_ClaraCompanionForUpdate.IsOnMount());Scenario 2 - Player is on a horse, and Clara is on a horse;Do nothing in this scenario, so no functions/such will be usedClara_IsSheTryingToRideMia = false;ElseIf (Clara_ClaraCompanionForUpdate.IsOnMount() && !(Player.IsOnMount()));Scenario 3 - Clara is on a horse, but Player is not;FIRST: Set Global to not ridingClara_HorseRidingVar.SetValue(1) ;NEXT: Evaluate Mia's packagesClara_HorseMia.EvaluatePackage() ;NEXT: Evaluate Clara's packagesClara_ClaraCompanionForUpdate.EvaluatePackage() ;Finally: Make sure Clara is actually dismountedIf (Clara_ClaraCompanionForUpdate.IsOnMount())Clara_ClaraCompanionForUpdate.Dismount()EndIf Clara_IsSheTryingToRideMia = false;Else;Scenario 4 - Player is not on horse, and Clara is not on horse;Do nothing in this scenario, so no function/such will be used - Except reset the Hore Riding Attempt if it is not alreadyClara_IsSheTryingToRideMia = false;EndIfElse;EndIfEndEvent ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function: SummonHorse;Purpose: This method will move Mia over to Clara;;Parameters: Nothing;Returns: Nothing;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function SummonHorse()Clara_HorseMia.MoveTo(Clara_ClaraCompanionForUpdate)Clara_HorseMia.EvaluatePackage()Clara_ClaraCompanionForUpdate.EvaluatePackage() Utility.Wait(3.0)EndFunction ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function: StopWhistleScene;Purpose: This method will end the Whistle sequence;;Parameters: Nothing;Returns: Nothing;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function StopWhistleScene()If(Clara_Followquest_HorseWhistle.IsPlaying())Clara_Followquest_HorseWhistle.Stop()EndIfEndFunction ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function: ShouldWearHood;Purpose: This method will determine if the NPC should be wearing a hood or Not;;Parameters: Companion - NPC that will be involved with the hood check;Returns: Hood = 1 | Hood and Cape = 2 | No Hood = 0 | Irrelevant = -1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Int Function ShouldWearHood(Actor Companion);First determine our WeatherWeather currentlyOccuringWeather = Weather.GetCurrentWeather();Determine the class of Weatherint weatherClass = currentlyOccuringWeather.GetClassification() ;Determine if this class is considered badbool isBad = False If (weatherClass > 1)isBad = TrueEndIf ;Determine the WorldSpaces for the ActorsWorldspace companionWorldspace = Companion.GetWorldSpace()Worldspace playerWorldspace = Game.GetPlayer().GetWorldSpace()If (isBad);We have determined there is bad WeatherIf (companionWorldspace != playerWorldspace);The player is not in the same space as the NPC;Result - Skip the actionreturn -1ElseIf (companionWorldSpace == Interiors);Why we are inside who knowsCell currInteriorCell = Companion.GetParentCell() ;Debug.MessageBox(currInteriorCell) if ((currInteriorCell == RiftenHoneyside) || (currInteriorCell == MarkarthVlindrelHall) || (currInteriorCell == SolitudeProudspireManor) || (currInteriorCell == WindhelmHjerim) || (currInteriorCell == WhiterunBreezehome))return 0Else;Not in player homereturn 1EndIf ElseIf ((companionWorldSpace == MarkarthWorld) || (companionWorldSpace == RiftenWorld) || (companionWorldSpace == SolitudeWorld) || (companionWorldSpace == WhiterunWorld) || (companionWorldSpace == WindhelmWorld))return 1Elsereturn 2EndIf Else;Not bad weather, but still need to determine if outsideIf ((companionWorldSpace != MarkarthWorld) && (companionWorldSpace != RiftenWorld) && (companionWorldSpace != SolitudeWorld) && (companionWorldSpace != WhiterunWorld) && (companionWorldSpace != WindhelmWorld) &&(companionWorldSpace != Interiors))return 1 ElseCell currInteriorCell = Companion.GetParentCell() ;Debug.MessageBox(currInteriorCell) if ((currInteriorCell == RiftenHoneyside) || (currInteriorCell == MarkarthVlindrelHall) || (currInteriorCell == SolitudeProudspireManor) || (currInteriorCell == WindhelmHjerim) || (currInteriorCell == WhiterunBreezehome))return 0Else;Not in player homereturn 1EndIfEndIfEndIf EndFunction ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function: PerformGiftGiving;Purpose: This method will open the gift giving menu, and handle what to do with the return value of Favor Points gained;;Parameters: Companion - NPC that will be involved;Returns: Nothing;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function PerformGiftGiving(Actor Companion);First open up the menuint giftGivingResult = Companion.ShowGiftMenu(true, None, true, true) ;Figure out how to deal with the favorIf (giftGivingResult > 0)int pickPotionOrPoison = Utility.RandomInt(0, 100) Actor Player = Game.GetPlayer() ;Figure out which one to giveIf (pickPotionOrPoison < 20)Player.AddItem(HealthPotions[0], 1)ElseIf (pickPotionOrPoison >= 20 && pickPotionOrPoison < 40)Player.AddItem(HealthPotions[1], 1)ElseIf (pickPotionOrPoison >= 40 && pickPotionOrPoison < 60)Player.AddItem(HealthPotions[2], 1)ElseIf (pickPotionOrPoison >= 60 && pickPotionOrPoison < 80)Player.AddItem(HealthPotions[3], 1)ElsePlayer.AddItem(HealthPotions[4], 1)EndIfEndIfEndFunction Edited May 19, 2018 by LadySagitar Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 19, 2018 Share Posted May 19, 2018 The compiler error states that the variable aaSagitar_GallusSagitarQuest is undefined. If this is the same quest as the one that the fragment is on, you can use the special variable called kmyquest. See here for details: https://www.creationkit.com/index.php?title=Quest_Stage_Fragments If this is a different quest from the one that the fragment is on, you will need to comment out the code lines containing the variable, compile, add the property variable via the property window, uncomment the previous lines and compile again. Link to comment Share on other sites More sharing options...
Deleted3897072User Posted May 19, 2018 Share Posted May 19, 2018 (edited) < duplicate post > Edited May 19, 2018 by OldMansBeard Link to comment Share on other sites More sharing options...
Deleted3897072User Posted May 19, 2018 Share Posted May 19, 2018 (edited) It's as I said, a missing property. You need to add aaSagitar_GallusSagitarQuest as a property of the scene script, otherwise the fragment doesn't know what the name refers to. LIke the compiler was trying to tell you. (edit - Ninja'd :D ) Edited May 19, 2018 by OldMansBeard Link to comment Share on other sites More sharing options...
LadySagitar Posted May 19, 2018 Author Share Posted May 19, 2018 (edited) oh! okay, how do I do that? edit: I thought I already had it defined as a property? Edited May 22, 2018 by LadySagitar Link to comment Share on other sites More sharing options...
Recommended Posts