Jump to content

Papyrus alias ref not compiling


soupdragon1234

Recommended Posts

Hi I'm having an issue with alias refs not behaving themselves, I've got a script fragment that upon an actor speaking to the player it changes the relationship rank of the speaker to another actor, specifically meeko the dog.

 

If I make him a specific reference it compiles and indeed it works in the game, however if try and use him in a reference alias from another quest, in this case the adoption quest, it fails with -

 

"type mismatch on parameter 1 (did you forget a cast?)
No output generated for TESTING123__01003EED, compilation failed."

 

Heres what I've got so far:

 

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TESTING123__01003EED Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
akSpeaker.SetRelationshipRank(Meeko, 1) ; or akSpeaker.SetRelationshipRank(FamilyPet, 1)
;END CODE
EndFunction
;END FRAGMENT

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

Actor Property Meeko Auto

ReferenceAlias Property FamilyPet Auto

 

 

specific ref, compiles ok;

http://oi58.tinypic.com/23ssw43.jpg

http://oi58.tinypic.com/2hsb05h.jpg

 

alias ref, compile fails:

http://oi62.tinypic.com/nfgn6u.jpg

http://oi59.tinypic.com/34s3tqt.jpg

 

now clearly the problem is it doesn't like the alias ref, but what am I doing wrong here?

 

Thanks for any help.

 

edit: @smashly: it works! You're a genius! thanks

Edited by soupdragon1234
Link to comment
Share on other sites

  • Recently Browsing   0 members

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