ShaKelTa Posted June 20, 2018 Share Posted June 20, 2018 I'm trying to make a mod that works similar to the Underground Bathhouse Mod. Ive copied and edited some of the scripts from that mod for personal use, but the issue im struggling with is clothes changing. I'm trying to set things up so that the followers gear is stored in a chest, based on what Alias they were assigned by the script when i invited them to my new place, but it is refusing to compile. the scripts are as follows: MoveIn compiles ok Scriptname OBguestsMoveIn extends Questreferencealias property OBguest01 autoGlobalVariable property aa_OB_guest1inBH autoreferencealias property OBguest02 autoGlobalVariable property aa_OB_guest2inBH autoreferencealias property OBguest03 autoGlobalVariable property aa_OB_guest3inBH autoreferencealias property OBguest04 autoGlobalVariable property aa_OB_guest4inBH autoreferencealias property OBguest05 autoGlobalVariable property aa_OB_guest5inBH autoreferencealias property OBguest06 autoGlobalVariable property aa_OB_guest6inBH autoreferencealias property OBguest07 autoGlobalVariable property aa_OB_guest7inBH autoreferencealias property OBguest08 autoGlobalVariable property aa_OB_guest8inBH autoreferencealias property OBguest09 autoGlobalVariable property aa_OB_guest9inBH autoreferencealias property OBguest10 autoGlobalVariable property aa_OB_guest10inBH autoreferencealias property OBguest11 autoGlobalVariable property aa_OB_guest11inBH autoreferencealias property OBguest12 autoGlobalVariable property aa_OB_guest12inBH autoreferencealias property OBguest13 autoGlobalVariable property aa_OB_guest13inBH autoreferencealias property OBguest14 autoGlobalVariable property aa_OB_guest14inBH autoreferencealias property OBguest15 autoGlobalVariable property aa_OB_guest15inBH autoreferencealias property OBguest16 autoGlobalVariable property aa_OB_guest16inBH autoFaction property OBGuestFaction autoFaction property OBPlaceholderFaction autoGlobalVariable property aa_OB_guestCount autoFunction MoveGuestIn(Actor Guest)If (aa_OB_guest1inBH.GetValueInt() == 0)OBguest01.ForceRefTo(Guest)aa_OB_guest1inBH.SetValueInt(1)ElseIf (aa_OB_guest2inBH.GetValueInt() == 0)OBguest02.ForceRefTo(Guest)aa_OB_guest2inBH.SetValueInt(1)ElseIf (aa_OB_guest3inBH.GetValueInt() == 0)OBguest03.ForceRefTo(Guest)aa_OB_guest3inBH.SetValueInt(1)ElseIf (aa_OB_guest4inBH.GetValueInt() == 0)OBguest04.ForceRefTo(Guest)aa_OB_guest4inBH.SetValueInt(1)ElseIf (aa_OB_guest5inBH.GetValueInt() == 0)OBguest05.ForceRefTo(Guest)aa_OB_guest5inBH.SetValueInt(1)ElseIf (aa_OB_guest6inBH.GetValueInt() == 0)OBguest06.ForceRefTo(Guest)aa_OB_guest6inBH.SetValueInt(1)ElseIf (aa_OB_guest7inBH.GetValueInt() == 0)OBguest07.ForceRefTo(Guest)aa_OB_guest7inBH.SetValueInt(1)ElseIf (aa_OB_guest8inBH.GetValueInt() == 0)OBguest08.ForceRefTo(Guest)aa_OB_guest8inBH.SetValueInt(1)ElseIf (aa_OB_guest9inBH.GetValueInt() == 0)OBguest09.ForceRefTo(Guest)aa_OB_guest9inBH.SetValueInt(1)ElseIf (aa_OB_guest10inBH.GetValueInt() == 0)OBguest10.ForceRefTo(Guest)aa_OB_guest10inBH.SetValueInt(1)ElseIf (aa_OB_guest11inBH.GetValueInt() == 0)OBguest11.ForceRefTo(Guest)aa_OB_guest11inBH.SetValueInt(1)ElseIf (aa_OB_guest12inBH.GetValueInt() == 0)OBguest12.ForceRefTo(Guest)aa_OB_guest12inBH.SetValueInt(1)ElseIf (aa_OB_guest13inBH.GetValueInt() == 0)OBguest13.ForceRefTo(Guest)aa_OB_guest13inBH.SetValueInt(1)ElseIf (aa_OB_guest14inBH.GetValueInt() == 0)OBguest14.ForceRefTo(Guest)aa_OB_guest14inBH.SetValueInt(1)ElseIf (aa_OB_guest15inBH.GetValueInt() == 0)OBguest15.ForceRefTo(Guest)aa_OB_guest15inBH.SetValueInt(1)ElseIf (aa_OB_guest16inBH.GetValueInt() == 0)OBguest16.ForceRefTo(Guest)aa_OB_guest16inBH.SetValueInt(1)EndIfGuest.AddToFaction(OBGuestFaction)Guest.AddToFaction(OBPlaceholderFaction)Guest.EvaluatePackage()aa_OB_guestCount.SetValueInt(aa_OB_guestCount.GetValueInt() + 1)EndFunctionFunction MoveGuestOut(Actor Guest, referencealias OBguestAlias)Guest.RemoveFromFaction(OBGuestFaction)Guest.RemoveFromFaction(OBPlaceholderFaction)If (aa_OB_guestCount.GetValueInt() > 16)aa_OB_guestCount.SetValueInt(16)EndIfIf (OBguestAlias == OBguest01)aa_OB_guest1inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest02)aa_OB_guest2inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest03)aa_OB_guest3inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest04)aa_OB_guest4inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest05)aa_OB_guest5inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest06)aa_OB_guest6inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest07)aa_OB_guest7inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest08)aa_OB_guest8inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest09)aa_OB_guest9inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest10)aa_OB_guest10inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest11)aa_OB_guest11inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest12)aa_OB_guest12inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest13)aa_OB_guest13inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest14)aa_OB_guest14inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest15)aa_OB_guest15inBH.SetValueInt(0)EndIfIf (OBguestAlias == OBguest16)aa_OB_guest16inBH.SetValueInt(0)EndIfOBguestAlias.Clear()aa_OB_guestCount.SetValueInt(aa_OB_guestCount.GetValueInt() - 1)Guest.EvaluatePackage()EndFunction this is attached to the clothing dialogue quest to try and set which container to use. it compiles ok. Scriptname OBItems extends OBguestsMoveInreferencealias property aa_OB_ItemsContREF autoObjectReference Property aa_OB_ItemsCont1 autoObjectReference Property aa_OB_ItemsCont2 autoObjectReference Property aa_OB_ItemsCont3 autoObjectReference Property aa_OB_ItemsCont4 autoObjectReference Property aa_OB_ItemsCont5 autoObjectReference Property aa_OB_ItemsCont6 autoObjectReference Property aa_OB_ItemsCont7 autoObjectReference Property aa_OB_ItemsCont8 autoObjectReference Property aa_OB_ItemsCont9 autoObjectReference Property aa_OB_ItemsCont10 autoObjectReference Property aa_OB_ItemsCont11 autoObjectReference Property aa_OB_ItemsCont12 autoObjectReference Property aa_OB_ItemsCont13 autoObjectReference Property aa_OB_ItemsCont14 autoObjectReference Property aa_OB_ItemsCont15 autoObjectReference Property aa_OB_ItemsCont16 autoFunction Dressing(Actor Guest, referencealias OBguestAlias)If (OBguestAlias == OBguest01)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont1)EndIfIf (OBguestAlias == OBguest02)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont2)EndIfIf (OBguestAlias == OBguest03)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont3)EndIfIf (OBguestAlias == OBguest04)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont4)EndIfIf (OBguestAlias == OBguest05)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont5)EndIfIf (OBguestAlias == OBguest06)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont6)EndIfIf (OBguestAlias == OBguest07)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont7)EndIfIf (OBguestAlias == OBguest08)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont8)EndIfIf (OBguestAlias == OBguest09)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont9)EndIfIf (OBguestAlias == OBguest10)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont10)EndIfIf (OBguestAlias == OBguest11)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont11)EndIfIf (OBguestAlias == OBguest12)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont12)EndIfIf (OBguestAlias == OBguest13)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont13)EndIfIf (OBguestAlias == OBguest14)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont14)EndIfIf (OBguestAlias == OBguest15)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont15)EndIfIf (OBguestAlias == OBguest16)aa_OB_ItemsContREF.ForceRefTo(aa_OB_ItemsCont16)EndIfEndFunction then i add this as a fragment on the dialogue and it refused to compile. (GetOwningQuest() As OBItems).Dressing(akSpeaker) if(akSpeaker.IsPlayerTeammate())akSpeaker.Removeallitems(aa_OB_ItemsContREF, 1, false)endif It keeps giving this error Starting 1 compile threads for 1 files...Compiling "TIF__04014C7C"...D:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(9,30): argument obguestalias is not specified and has no default valueD:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(12,25): variable aa_OB_ItemsContREF is undefinedNo output generated for TIF__04014C7C, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on TIF__04014C7C Link to comment Share on other sites More sharing options...
foamyesque Posted June 21, 2018 Share Posted June 21, 2018 (edited) In your fragment you neither declared nor assigned a value to the variable aa_OB_ItemsContRef. The script you have attached to the quest is distinct from the fragments on dialogue and so anything you need to share needs to be moved like it would be between any other two unrelated scripts. Fortunately for you, this is pretty easy in this case because the script you need to access is on the owning quest. OB_Items kmyQuest = GetOwningQuest() as OBItems kmyQuest.Dressing(akSpeaker) if(akSpeaker.IsPlayerTeammate()) akSpeaker.Removeallitems(kmyQuest.aa_OB_ItemsContREF, 1, false) endif If I understand your code structure correctly this should solve the compilation error. Edited June 21, 2018 by foamyesque Link to comment Share on other sites More sharing options...
ShaKelTa Posted June 22, 2018 Author Share Posted June 22, 2018 (edited) i tried it, but i get this error instead. Starting 1 compile threads for 1 files...Compiling "TIF__04014C7C"...D:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(9,9): unknown type ob_itemsD:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(9,9): type mismatch while assigning to a ob_items (cast missing or types unrelated)D:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(10,9): ob_items is not a known user-defined typeD:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(12,40): ob_items is not a known user-defined typeNo output generated for TIF__04014C7C, compilation failed. i noticed the issue with your code being OB_Items instead of OBItems to start and now i get Starting 1 compile threads for 1 files...Compiling "TIF__04014C7C"...D:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(10,9): argument obguestalias is not specified and has no default valueD:\ApplicationData\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__04014C7C.psc(12,16): type mismatch on parameter 1 (did you forget a cast?)No output generated for TIF__04014C7C, compilation failed. so now the issue lies in the line Function Dressing(Actor Guest, referencealias OBguestAlias Edited June 22, 2018 by ShaKelTa Link to comment Share on other sites More sharing options...
foamyesque Posted June 22, 2018 Share Posted June 22, 2018 Oh, missed that. Your Dressing function expects both an Actor and a ReferenceAlias parameter, but you only supplied it with an Actor and I just copied the call. I don't know what reference alias you intend to put there, unfortunately. Link to comment Share on other sites More sharing options...
ShaKelTa Posted June 22, 2018 Author Share Posted June 22, 2018 the reference alias was supposed to be assigned by the first script OBguestsMoveIn. basicly you as a follower to move in, and they are assigned a alias #. im trying to have the second sript read that assigned alias and choose the right safe for their items to be stored in. i can then have them reeqiup those items if i have them leave the place. Link to comment Share on other sites More sharing options...
Recommended Posts