Voidshard Posted March 22, 2012 Share Posted March 22, 2012 (edited) Hi there, I have a new script for a group of actors I am modding at the moment. Or attempting too, in this case. My script (let's call it myScript) extends Actor, I have created a faction (myFaction for example) and I have added two ranks (0 and 1).I then attempt to call SetFactionRank( myFaction, 1) The script fails to compile. Irritatingly I can't seem to get Notepad++ to compile papyrus (cmd using the batch compiler doesn't seem to find the file in question either - Probably a path issue but ...meh) so I am left with only the blank "Compile Failed" message to guess what went wrong.Still by editing / commenting things in an out I believe this line to be the problem. Sadly the code doesn't recognise the "this" keyword .. although it shouldn't be required here anyway since the actor in question should be the actor the script is attached to. <><> Scriptname myScript extends Actor auto STATE stay Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() SetFactionRank(myFaction, 1) goToSTATE("follow") endif EndEventendSTATE STATE follow Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() ; stuff goToSTATE("stay") endif EndEventendSTATE <> Naturally my question is, I must be missing something (probably something obvious knowing me) but what is it? *Edit* Sorry the code looks awful. It is nicely formatted when I go to post it .. Edited March 22, 2012 by Voidshard Link to comment Share on other sites More sharing options...
David Brasher Posted March 22, 2012 Share Posted March 22, 2012 I suppose you set your properties before trying to compile the script? Link to comment Share on other sites More sharing options...
Recommended Posts