soupdragon1234 Posted January 25, 2015 Share Posted January 25, 2015 (edited) 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 1Scriptname TESTING123__01003EED Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_0Function Fragment_0(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEakSpeaker.SetRelationshipRank(Meeko, 1) ; or akSpeaker.SetRelationshipRank(FamilyPet, 1);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentActor Property Meeko AutoReferenceAlias Property FamilyPet Auto specific ref, compiles ok;http://oi58.tinypic.com/23ssw43.jpghttp://oi58.tinypic.com/2hsb05h.jpg alias ref, compile fails:http://oi62.tinypic.com/nfgn6u.jpghttp://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 January 25, 2015 by soupdragon1234 Link to comment Share on other sites More sharing options...
smashly Posted January 25, 2015 Share Posted January 25, 2015 (edited) Hi, maybe tryakSpeaker.SetRelationshipRank(FamilyPet.GetActorRef(), 1) I'm assuming SetRelationshipRank expects an Actor not an Alias Reference Edited January 25, 2015 by smashly Link to comment Share on other sites More sharing options...
Recommended Posts