NyXio Posted July 25, 2013 Share Posted July 25, 2013 Hi, I've been trying to work this out for hours but seems no matter what combinations I use, I can't get this script to compile. I'm trying to enable then teleport a custom character to the player after they sleep, but I keep getting errors with the MoveTo function. Any help would be greatly appreciated. My script is currently: Scriptname Sin06PlayerScript extends ReferenceAlias event OnSleepStart(float atSleepStartTime, float atDesiredSleepEndTime) Sin.getRef().Enable() Sin.MoveTo(Game.Getplayer()( 200, 0, 0) UnregisterForSleep()endevent I have an alias set up for Sin and the player, but still receive these error messages:Starting 1 compile threads for 1 files...Compiling "Sin06PlayerScript"...X:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\Sin06PlayerScript.psc(6,28): mismatched input '(' expecting RPARENX:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\Sin06PlayerScript.psc(6,32): required (...)+ loop did not match anything at input ','X:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\Sin06PlayerScript.psc(6,35): required (...)+ loop did not match anything at input ','X:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\Sin06PlayerScript.psc(6,38): required (...)+ loop did not match anything at input ')'No output generated for Sin06PlayerScript, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on Sin06PlayerScript I'm guessing perhaps commas and/or brackets are in the wrong place? Link to comment Share on other sites More sharing options...
isoku Posted July 25, 2013 Share Posted July 25, 2013 You have an extra parenthesis. Sin.MoveTo(Game.Getplayer()( 200, 0, 0) should be Sin.MoveTo(Game.Getplayer(), 200, 0, 0) Link to comment Share on other sites More sharing options...
NyXio Posted July 25, 2013 Author Share Posted July 25, 2013 Took it out but still won't work :( just returns these errors:Compiling "SinSleepScriptX"...X:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\SinSleepScriptX.psc(6,32): mismatched input '200' expecting RPARENX:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\SinSleepScriptX.psc(6,38): required (...)+ loop did not match anything at input ','X:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\SinSleepScriptX.psc(6,41): required (...)+ loop did not match anything at input ')'No output generated for Sin06PlayerScript, compilation failed. Link to comment Share on other sites More sharing options...
NyXio Posted July 25, 2013 Author Share Posted July 25, 2013 Aha never mind, I think I have it sorted now. I placed the actor (Sin) in game and changed the script to:Scriptname SinSleepScriptX extends ReferenceAlias event OnSleepStart(float atSleepStartTime, float atDesiredSleepEndTime) Sin.getActorRef().Enable() Sin.getActorRef().MoveTo(Game.Getplayer(), 200, 0, 0) UnregisterForSleep()endevent That seems to have fixed the problem. Thanks for your help :) Link to comment Share on other sites More sharing options...
TylerDurdenFC Posted June 21, 2014 Share Posted June 21, 2014 I have the exact same script, only with a setstage included. It compiles, but the NPC never appears (and setstage works because I do get the updated objctive to kill the NPC that failed to appear). The script is presently attached to the player alias. I have also tried having the script just handle changing the quest stage and having the appropriate stage fragment handle the teleport, but that also failed to provide results. The presense and absense of the ", 200, 0, 0)" at the end of the moveto line does not make a difference. Scriptname MyQuestNameSleepAttack extends ReferenceAlias Quest Property MyQuestNameProperty Auto ReferenceAlias Property Assassin Auto event OnSleepStart(float afSleeptStartTime, float afDesiredSleepEndTime) Assassin.getActorRef().Enable() Assassin.getRef().MoveTo(Game.Getplayer()) GetOwningQuest().SetStage(20) endevent Any ideas? Link to comment Share on other sites More sharing options...
Mattiewagg Posted June 21, 2014 Share Posted June 21, 2014 I have the exact same script, only with a setstage included. It compiles, but the NPC never appears (and setstage works because I do get the updated objctive to kill the NPC that failed to appear). The script is presently attached to the player alias. I have also tried having the script just handle changing the quest stage and having the appropriate stage fragment handle the teleport, but that also failed to provide results. The presense and absense of the ", 200, 0, 0)" at the end of the moveto line does not make a difference. Scriptname MyQuestNameSleepAttack extends ReferenceAlias Quest Property MyQuestNameProperty Auto ReferenceAlias Property Assassin Auto event OnSleepStart(float afSleeptStartTime, float afDesiredSleepEndTime) Assassin.getActorRef().Enable() Assassin.getRef().MoveTo(Game.Getplayer()) GetOwningQuest().SetStage(20) endevent Any ideas? Try: Scriptname MyQuestNameSleepAttack extends ReferenceAlias Quest Property MyQuestNameProperty Auto ReferenceAlias Property Assassin Auto Event OnSleepStart(float afSleeptStartTime, float afDesiredSleepEndTime) Assassin.GetActorRef().Enable() Assassin.GetActorRef().MoveTo(Game.Getplayer()) UnregisterForSleep() GetOwningQuest().SetStage(20) EndEvent Not entirely sure if that will work, but give it a shot. Link to comment Share on other sites More sharing options...
TylerDurdenFC Posted June 21, 2014 Share Posted June 21, 2014 Not entirely sure if that will work, but give it a shot. Gave it a shot. Still did not get my khajiit assassin. Any other ideas? Link to comment Share on other sites More sharing options...
TylerDurdenFC Posted June 29, 2014 Share Posted June 29, 2014 Is it something weird like the script has a property called Assassin that refers to an alias called Assassin and it doesnt really like that, or something else outside the script itself that is not set up fully? Link to comment Share on other sites More sharing options...
Mattiewagg Posted June 29, 2014 Share Posted June 29, 2014 Is it something weird like the script has a property called Assassin that refers to an alias called Assassin and it doesnt really like that, or something else outside the script itself that is not set up fully? You could try making a new mod - just for purposes of testing this script, and then try it and see if it works. Sometimes the CK just screws things up. Also, you should check out the Dark Brotherhood script. The player gets moved to the warehouse, but you could try reverse-scripting it so instead of the player getting moved somewhere, the assassin gets moved to the player. Link to comment Share on other sites More sharing options...
Recommended Posts