Jump to content

Scripting help needed


Mythaltir

Recommended Posts

Posted

Hello,
Im trying to get a character into a faction via scripts, the way i tried i by creating a quest, then when you talk to said character  the quest completes, in the objective of the quest the factions are changed.
 
but im having a problem when compiling it says that the Ref alias is undefined.
 
Maybe some of th ebrilliant minds around here will be able to explain to me what am i doing wrong.

 

 

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 4
Scriptname QF_RikkeMarryFollow_01000D62 Extends Quest Hidden

;BEGIN ALIAS PROPERTY Alias_RikkeMF
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Alias_RikkeMF Auto
;END ALIAS PROPERTY

;BEGIN FRAGMENT Fragment_3
Function Fragment_3()
;BEGIN CODE
Alias_RikkeMF.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 1)
Alias_RikkeMF.GetActorReference().RemoveFromFaction(MarriageExcludedFaction)
Alias_RikkeMF.GetActorReference().AddToFaction(PotentialMarriageFaction)
Alias_RikkeMF.GetActorReference().AddToFaction(PotentialFollowerFaction)
Alias_RikkeMF.GetActorReference().AddToFaction(CurrentFollowerFaction)
Alias_RikkeMF.GetActorReference().SetFactionRank(CurrentFollowerFaction, -1)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
 

 

 

and these are the errors i am getting

 

 

 

QF_RikkeMarryFollow_01000D62.psc(13,0): variable Alias_RikkeMF is undefined
QF_RikkeMarryFollow_01000D62.psc(13,14): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(13,34): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(14,0): variable Alias_RikkeMF is undefined
QF_RikkeMarryFollow_01000D62.psc(14,14): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(14,52): variable MarriageExcludedFaction is undefined
QF_RikkeMarryFollow_01000D62.psc(14,34): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(15,0): variable Alias_RikkeMF is undefined
QF_RikkeMarryFollow_01000D62.psc(15,14): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(15,47): variable PotentialMarriageFaction is undefined
QF_RikkeMarryFollow_01000D62.psc(15,34): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(16,0): variable Alias_RikkeMF is undefined
QF_RikkeMarryFollow_01000D62.psc(16,14): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(16,47): variable PotentialFollowerFaction is undefined
QF_RikkeMarryFollow_01000D62.psc(16,34): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(17,0): variable Alias_RikkeMF is undefined
QF_RikkeMarryFollow_01000D62.psc(17,14): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(17,47): variable CurrentFollowerFaction is undefined
QF_RikkeMarryFollow_01000D62.psc(17,34): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(18,0): variable Alias_RikkeMF is undefined
QF_RikkeMarryFollow_01000D62.psc(18,14): none is not a known user-defined type
QF_RikkeMarryFollow_01000D62.psc(18,49): variable CurrentFollowerFaction is undefined
QF_RikkeMarryFollow_01000D62.psc(18,34): none is not a known user-defined type

 

 

it may be a really stupid thing, but i really cant see wht it is.

Posted

My first impression is, that you did not add factions as "Properties" (The button is labled that way!)

 

There you must define what EXACTLY you mean with "(PotentialFollowerFaction)" f.e. and add this property and point it to the faction you want.

 

(English is just my second language and it´s really hard to find the right words. But in the script you could even write "shittyshittyfactionUpMyAss" and then link the "properties" correct to the REAL PotentialFollowerFaction and the script would work)

 

Which means WITHOUT the right properties, nochting will work.

 

***edit ***

I keep my bad grammar! Even keep my "nochting"

I´d add a grammar property "nochting" leading to "nothing" (this should work fine)

:lol:

Posted

Sirduke is on the right path. You need to add the properties of the factions just so they link through to the fragment.

 

You also need to fix the alias name. The alias name as you have it is "Alias_RikkeMF" which is fine. But when the CK creates the properties for an alias it adds Alias_ to the front. So the script version of the alias property is now Alias_Alias_RikkeMF which can be seen when you look at the code. So in your fragment window you would reference it using it's full true name Alias_Alias_RikkeMF not just Alias_RikkeMF. You could name the alias RikkeMF instead and then your existing code is fine as is.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...