Trying to add a script to a Quest, Causes CK to crash.

Post » Tue Feb 21, 2017 3:52 am

I have tried everything I can think of to place a script into a Quest, through the Script tab.


I click "Add Script",


I get the window for the Scripts



I click "New Script"


I get the window to create the new script



I add the script and set the name and click the OK button, and CK crashes.



Any suggestions on how to fix this?




Spoiler

Scriptname StormieFollowQuestScript extends Quest


Actor Property PlayerREF Auto


ReferenceAlias Property FollowerAlias Auto


Faction Property DismissedFollowerFaction Auto


Faction Property CurrentHireling Auto


Message Property FollowerDismissMessage Auto


Message Property FollowerDismissMessageWedding Auto


Message Property FollowerDismissMessageCompanions Auto


Message Property FollowerDismissMessageCompanionsMale Auto


Message Property FollowerDismissMessageCompanionsFemale Auto


Message Property FollowerDismissMessageWait Auto


SetHirelingRehire Property HirelingRehireScript Auto



;Property to tell follower to say dismissal line


Int Property iFollowerDismiss Auto Conditional



Function SetFollower(ObjectReference FollowerRef)


actor FollowerActor = FollowerRef as Actor


FollowerActor.RemoveFromFaction(DismissedFollowerFaction)


If FollowerActor.GetRelationshipRank(PlayerREF) <3 && FollowerActor.GetRelationshipRank(PlayerREF) >= 0


FollowerActor.SetRelationshipRank(PlayerREF, 3)


EndIf


FollowerActor.SetPlayerTeammate()


;FollowerActor.SetActorValue("Morality", 0)


FollowerAlias.ForceRefTo(FollowerActor)


FollowerActor.EvaluatePackage()


EndFunction



Function FollowerWait()


actor FollowerActor = FollowerAlias.GetActorRef() as Actor


FollowerActor.SetActorValue("WaitingForPlayer", 1)


SetObjectiveDisplayed(10, abforce = true)


;follower will wait 3 days


FollowerAlias.RegisterForSingleUpdateGameTime(72)


EndFunction



Function FollowerFollow()


actor FollowerActor = FollowerAlias.GetActorRef() as Actor


FollowerActor.SetActorValue("WaitingForPlayer", 0)


SetObjectiveDisplayed(10, abdisplayed = false)


FollowerActor.EvaluatePackage()


EndFunction



Function DismissFollower(Int iMessage = 0, Int iSayLine = 1)


If FollowerAlias && FollowerAlias.GetActorReference().IsDead() == False


If iMessage == 0


FollowerDismissMessage.Show()


ElseIf iMessage == 1


FollowerDismissMessageWedding.Show()


ElseIf iMessage == 2


FollowerDismissMessageCompanions.Show()


ElseIf iMessage == 3


FollowerDismissMessageCompanionsMale.Show()


ElseIf iMessage == 4


FollowerDismissMessageCompanionsFemale.Show()


ElseIf iMessage == 5


FollowerDismissMessageWait.Show()


Else


;failsafe


FollowerDismissMessage.Show()


EndIf


actor DismissedFollowerActor = FollowerAlias.GetActorRef() as Actor


DismissedFollowerActor.StopCombatAlarm()


DismissedFollowerActor.AddToFaction(DismissedFollowerFaction)


DismissedFollowerActor.SetPlayerTeammate(false)


DismissedFollowerActor.RemoveFromFaction(CurrentHireling)


DismissedFollowerActor.SetActorValue("WaitingForPlayer", 0)


;hireling rehire function


HirelingRehireScript.DismissHireling(DismissedFollowerActor.GetActorBase())


If iSayLine == 1


iFollowerDismiss = 1


DismissedFollowerActor.EvaluatePackage()


;Wait for follower to say line


Utility.Wait(2)


EndIf


FollowerAlias.Clear()


iFollowerDismiss = 0


;don't set count to 0 if Companions have replaced follower


If iMessage == 2


;do nothing


EndIf


EndIf


EndFunction



Maybe it's something in the script?
User avatar
Destinyscharm
 
Posts: 3404
Joined: Sun Jul 23, 2006 6:06 pm

Post » Mon Feb 20, 2017 11:19 pm

https://www.creationkit.com/index.php?title=Sublime_Text_Setup



sounds like your compiler, are your computer specs up to the minimum required? have you tried reinstalling?

User avatar
Robert Garcia
 
Posts: 3323
Joined: Thu Oct 11, 2007 5:26 pm

Post » Tue Feb 21, 2017 6:23 am

Running an i7 6700 16gb w/ GForce 1070 8gb


That should be enough.



I haven't tried reinstalling no.


I will give that a try.



I was able to add a small script to the Quest through the Script tab and it compiled, so then I went in and edited the script through the Scripts tab to the script I wanted and it compiled successfully. I am stumped as to why it is doing this. It just would not take that script directly. But that script did compile without errors.



Migraine headache number ... haha



I'll try and reinstall CK today.


Thank you very much for the response.

User avatar
sophie
 
Posts: 3482
Joined: Fri Apr 20, 2007 7:31 pm

Post » Tue Feb 21, 2017 10:57 am

Re-installed CK and it made all the difference.


Everything working fine now. Not sure what happened to CK on my computer but it is fixed now.



Thank you for the suggestion.

User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm


Return to V - Skyrim