Dark09188 Posted April 30 Posted April 30 1: function HireSteward(int houseIndex, Actor akNewSteward) HouseStewards[houseIndex].ForceRefTo(akNewSteward) (HouseQuests[houseIndex] as BYOHhouseScript).bHaveSteward = true ; dismiss the follower DialogueFollower.DismissFollower(0, 0) endFunction 2: function HireSteward(int houseIndex, Actor akNewSteward) Efil.ForceRefTo(akNewSteward) bHaveSteward = true ; dismiss the follower endFunction 3: ;debug.trace(self + " stage 100") ; make follower steward if Alias_HouseLocation.GetLocation() == BYOHHouse1Location BYOHHouseBuilding.HireSteward(0, Alias_Follower.GetActorRef()) elseif Alias_HouseLocation.GetLocation() == BYOHHouse2Location BYOHHouseBuilding.HireSteward(1, Alias_Follerower.GetActorRef()) elseif Alias_HouseLocation.GetLocation() == BYOHHouse3Location BYOHHouseBuilding.HireSteward(2, Alias_Follow.GetActorRef()) endif 4: if Alias_TaldesEinklangsLoc.GetLocation() == TalLocation AB0000VogtQuestzusatz.HireSteward(0, Alias_Efil.GetActorRef 5: Picture 1 = This is a script fragment from a script I need 2= This is the fragment I could successfully compile from the first one 3 = This is the quest script fragment from BYOHHouseStewardOffer 4 = My quest fragment derived from the BYOHHouseStewardOffer quest fragment 5 = The error message I get when creating the quest fragment Can someone help me and tell me what I am missing or not noticing
dylbill Posted April 30 Posted April 30 You get that error when you try to call a member function as if it's a global function. You'd get the same error if you tried to do for instance Form.GetFormID(). You need to get whatever AB0000VogtQuestzusatz is attached to and call it from that. Example: (GetOwningQuest() as AB0000VogtQuestzusatz).HireSteward(0, Alias_Efil.GetActorRef())
Dark09188 Posted April 30 Author Posted April 30 Ah, i see. Your Example make Sense. I was just confused that both came from different quests, in the line.
Dark09188 Posted April 30 Author Posted April 30 Hmmm, i have tried it in a few different ways nothing worked. Its not easy to make a steward for an whole exterior world.
PeterMartyr Posted May 1 Posted May 1 Do have coding experience, to me it looks like your trying to use a then, mixed with python code indenting, or this that just sign that you have no experience and it is bad misplace attempted assignment, plus yeah how you declaring your properties and variables.. like the quest, you are treating them like they are "static objects", (just in case your experienced) you need to declare and define them. There more than one thing wrong in the image Declare int x Define int x = 42 or in Papyrus Quest Property MyQuest Auto Now in the Creation Kit point to a Quest using the property GUI (Graphic User Interface) to define it then code like this with a cast to the script (MyQuest as ThisScript).HireSteward(0, Alias_Efil.GetActorRef()) or just link it to the script directly (what I recommend) and it will look what you trying to do, again define it in the creation kit too MyQuestScriptName Property myScript Auto myScript.HireSteward(0, Alias_Efil.GetActorRef()) I hope I am right in treating you like some one that has done basic coding something.. but that info cannot hurt)) btw the above is just generic informant on declaring and defining properties, both Quest and Scripts, and how to use them in other Scripts, not advice on how to actual code your problem, I need more info, for that you have not given us much
Dark09188 Posted May 1 Author Posted May 1 I mostly used the original scripts from hearthfire and took the parts i needed. However, several scripts from different quests seems to work together. I then tried to bundle the different parts of the different scripts into one. Mostly from the BYOHHouseScript and the BYOHHouseBuildingScript.
Dark09188 Posted May 1 Author Posted May 1 (edited) The Part i mean from the BYOHHouseBuildingScript. The houseindex seems not directly defined. i though the define is in the Gamecode Edited May 1 by Dark09188
PeterMartyr Posted May 1 Posted May 1 OK, I thanks, I get it, I will just continue with advise that makes getting help easier, look at the post tool bar Notice the two chevrons <> if you click that it open a code bock, copy your code from Notepad++ and paste it here, it make easier for us to read and looks like this Event OnDeath(Actor akKiller) Actor akActor = Self.GetReference() As Actor akActor.RemoveFromAllFactions() Self.Clear() EndEvent
Dark09188 Posted May 1 Author Posted May 1 (edited) Scriptname Ab0000VogtQuestZusatz extends Quest Conditional DialogueFollowerScript Property DialogueFollower Auto Bool Property bHaveSteward Auto Conditional ReferenceAlias Property Efil Auto Ab0000VogtQuestZusatz Property myScript Auto function HireSteward(Actor akNewSteward) Efil.ForceRefTo(akNewSteward) bHaveSteward = true DialogueFollower.DismissFollower(0, 0) endFunction function DismissSteward(Actor akSteward) if Efil.GetActorRef() == akSteward Efil.Clear() bHaveSteward = false endif endFunction SetObjectiveCompleted(10) SetObjectiveDisplayed(20) Alias_Efil.GetActorRef().SetPlayerTeammate(false) if Alias_TaldesEinklangsLoc.GetLocation() == TalLocation BYOHHouseBuilding.HireSteward(0, Alias_Efil.GetActorRef()) EndIf ;debug.trace(self + " stage 100") ; make follower steward if Alias_HouseLocation.GetLocation() == BYOHHouse1Location BYOHHouseBuilding.HireSteward(0, Alias_Follower.GetActorRef()) elseif Alias_HouseLocation.GetLocation() == BYOHHouse2Location BYOHHouseBuilding.HireSteward(1, Alias_Follower.GetActorRef()) elseif Alias_HouseLocation.GetLocation() == BYOHHouse3Location BYOHHouseBuilding.HireSteward(2, Alias_Follower.GetActorRef()) endif Stop() The First is my compiled Script. The Second should be my Queststage and the third the Original QuestStage from BYOHHouseStewardOffer Edited May 1 by Dark09188
PeterMartyr Posted May 1 Posted May 1 I got no idea what you doing, but I still sanitised it for you by adding some properties you may need... Starting 1 compile threads for 1 files... Compiling "Ab0000VogtQuestZusatz"... Starting assembly of Ab0000VogtQuestZusatz 0 error(s), 0 warning(s) Assembly succeeded Compilation succeeded. Batch compile of 1 files finished. 1 succeeded, 0 failed. [Finished in 2.3s] I can see you are trying to make a follower a House Stewart Scriptname Ab0000VogtQuestZusatz extends Quest Conditional ; ======================================================= ; ======================================================= ; Obliviously a Quest Script ; ======================================================= ; ======================================================= DialogueFollowerScript Property DialogueFollower Auto Bool Property bHaveSteward Auto Conditional ReferenceAlias Property Efil Auto function HireSteward(Actor akNewSteward) Efil.ForceRefTo(akNewSteward) bHaveSteward = true DialogueFollower.DismissFollower(0, 0) endFunction function DismissSteward(Actor akSteward) if Efil.GetActorRef() == akSteward Efil.Clear() bHaveSteward = false endif endFunction ; ======================================================= ; ======================================================= ; Guessing this a QF Fragment ; ======================================================= ; ======================================================= ReferenceAlias Property Alias_Efil Auto LocationAlias Property Alias_TaldesEinklangsLoc Auto Location Property TalLocation Auto Function SomeFragNumber1() SetObjectiveCompleted(10) SetObjectiveDisplayed(20) Alias_Efil.GetActorRef().SetPlayerTeammate(false) if Alias_TaldesEinklangsLoc.GetLocation() == TalLocation BYOHHouseBuilding.HireSteward(0, Alias_Efil.GetActorRef()) EndIf EndFunction ; ======================================================= ; ======================================================= ; Guessing this a QF Fragment ; ======================================================= ; ======================================================= BYOHHouseBuildingScript Property BYOHHouseBuilding Auto Location Property BYOHHouse1Location Auto {location for house 1} Location Property BYOHHouse2Location Auto {location for house 2} Location Property BYOHHouse3Location Auto {location for house 3} LocationAlias Property Alias_houseLocation Auto ReferenceAlias Property Alias_Follower Auto Function SomeFragNumber2() if Alias_HouseLocation.GetLocation() == BYOHHouse1Location BYOHHouseBuilding.HireSteward(0, Alias_Follower.GetActorRef()) elseif Alias_HouseLocation.GetLocation() == BYOHHouse2Location BYOHHouseBuilding.HireSteward(1, Alias_Follower.GetActorRef()) elseif Alias_HouseLocation.GetLocation() == BYOHHouse3Location BYOHHouseBuilding.HireSteward(2, Alias_Follower.GetActorRef()) endif Self.Stop() EndFunction ; ======================================================= ; ======================================================= By sanitising I mean I cleaned so it compiled, I am not saying it is going to work, but will help you understand what the compilation errors were
Recommended Posts