I've got a script set up, and I cannot for the life of me figure out the issue. Since this error (shown below) shows on line 18, 9 for every script, I assume it's a compiler problem. I tried verifying Skyrim and CK files, as well as not compiling within Sublime Text 2 and in the CK, but the error persists. This is the error:
Starting 1 compile threads for 1 files...Compiling "FFPlayerAliasScript"...C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'No output generated for FFPlayerAliasScript.psc, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on FFPlayerAliasScript.psc[Finished in 1.1s]
To show it does this for all, another compiler error for an entirely different script:
Starting 1 compile threads for 1 files...Compiling "FFMCMScript"...C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'No output generated for FFMCMScript.psc, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on FFMCMScript.psc[Finished in 0.6s with exit code -1]
EDIT: Just tried it on a third script. Works for this one? Here's the scripts:
1 (Failed):
Scriptname FFMCMScript extends SKI_ConfigBase {The MCM menu control script for Fighting Fatigue}Bool Property ToggleOneHandedFF Auto {Whether or not to use One Handed Fighting Fatigue}Int Property OneHandedFFMag Auto {The magnitude of the One Handed Fighting Fatigue feature}Bool Property ToggleTwoHandedFF Auto{Whether or not to use Two Handed Fighting Fatigue feature}Int Property TwoHandedFFMag Auto {The magnitude of the One Handed Fighting Fatigue feature};============================================================Spell Property FFSpell Auto Actor PlayerEvent OnInit() Player =EndEventEvent OnPageReset(string a_page) If a_page == "Feature Toggles" SetCursorFillMode(TOP_TO_BOTTOM) AddToggleOptionST("Toggle1HandState", "Toggle One-Handed Fatigue", ToggleOneHandedFF) AddToggleOptionST("Toggle2HandState", "Toggle Two-Handed Fatigue", ToggleTwoHandedFF) ElseIf a_page == "Configuration" AddSliderOptionST("Slider1HandState", "One-Handed Magnitude", OneHandedFFMag) AddSliderOptionST("Slider2HandState", "Two-Handed Magnitude", TwoHandedFFMag) EndIfEndEventState Toggle1HandStateEvent OnDefaultST() SetToggleOptionValueST(true)EndEventEvent OnHighlightST() SetInfoText("Toggle fatigue for one-handed normal attacks.") EndEventEvent OnSelectST() ToggleOneHandedFF = !ToggleOneHandedFF SetToggleOptionValueST(ToggleOneHandedFF)EndEventEndStateState Toggle2HandStateEvent OnDefaultST() SetToggleOptionValueST(true)EndEventEvent OnHighlightST() SetInfoText("Toggle fatigue for two-handed normal attacks.") EndEventEvent OnSelectST() ToggleTwoHandedFF = !ToggleTwoHandedFF SetToggleOptionValueST(ToggleTwoHandedFF)EndEventEndStateState Slider1HandStateEvent OnDefaultST() SetSliderOptionValueST(15)EndEventEvent OnHighlightST() SetInfoText("Change the magnitude of the one-handed stamina damage. /n The default is 15, so you may want to play around with the value.")EndEventEvent OnSliderOpenST() SetSliderDialogStartValue(15) SetSliderDialogDefaultValue(15) SetSliderDialogRange(1, 200) SetSliderDialogInterval(1)EndEventEvent OnSliderAcceptST(float value) OneHandedFFMag = value as int SetSliderOptionValueST(OneHandedFFMag)EndEventEndStateState Slider2HandStateEvent OnDefaultST() SetSliderOptionValueST(25)EndEventEvent OnHighlightST() SetInfoText("Change the magnitude of the two-handed stamina damage. /n The default is 25, so you may want to play around with the value.")EndEventEvent OnSliderOpenST() SetSliderDialogStartValue(25) SetSliderDialogDefaultValue(25) SetSliderDialogRange(1, 200) SetSliderDialogInterval(1)EndEventEvent OnSliderAcceptST(float value) TwoHandedFFMag = value as int SetSliderOptionValueST(TwoHandedFFMag)EndEventEndStateEvent OnConfigClose() FFSpell.SetNthEffectMagnitude(0, OneHandedFFMag) FFSpell.SetNthEffectMagnitude(1, TwoHandedFFMag) Debug.Notification("1handed mag:" + FFSpell.GetNthEffectMagnitude(0)) Debug.Notification("2handed mag:" + FFSpell.GetNthEffectMagnitude(1))EndEvent
Compiler error:
Starting 1 compile threads for 1 files...Compiling "FFMCMScript"...C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'No output generated for FFMCMScript.psc, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on FFMCMScript.psc[Finished in 0.6s with exit code -1]
Script 2 (failed):
Scriptname FFPlayerAliasScript extends ReferenceAlias Spell Property FFSpell AutoMessage Property FFCompleteInstall Auto FFMCMScript Property MCM AutoEvent OnInit() RegisterForSingleUpdate(1.0)EndEventEvent OnUpdate() Game.GetPlayer().AddSpell(FFSpell, false) FFCompleteInstall.Show() EndEventEvent OnPlayerLoadGame() FFSpell.SetNthEffectMagnitude(0, MCM.OneHandedFFMag) FFSpell.SetNthEffectMagnitude(1, MCM.TwoHandedFFMag) Game.GetPlayer().RemoveSpell(FFSpell) Game.GetPlayer().AddSpell(FFSpell, false)EndEvent
Compiler error:
Starting 1 compile threads for 1 files...Compiling "FFPlayerAliasScript"...C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'C:\Games\Steam\steamapps\common\Skyrim\Data\scripts\Source\FFMCMScript.psc(18,9): no viable alternative at input '\\r\\n'No output generated for FFPlayerAliasScript.psc, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on FFPlayerAliasScript.psc[Finished in 1.1s]
Script 3 (works):
Scriptname STMCMScript extends SKI_ConfigBase{MCM for Simple Taxes.}GlobalVariable Property HouseTax AutoGlobalVariable Property HorseTax AutoGlobalVariable Property TaxTime AutoGlobalVariable Property ImmersiveTaxPay AutoGlobalVariable Property BountiesEnabled AutoGlobalVariable Property HousebEnabled AutoGlobalVariable Property HorsebEnabled AutoGlobalVariable Property DebtbEnabled AutoMessage Property ChangeCountMes Auto Message Property ChangeCountHorseMes Auto Message Property ChangeCountHouseMes Auto Book Property STGuidebook AutoInt ShowCompMes = 0Event OnPageReset(string a_page) If a_page == "" LoadCustomContent("SimpleTax/SimpleTaxesLogo.dds", 56, 73) Else UnloadCustomContent() EndIf If a_page == "Customization" SetCursorFillMode(TOP_TO_BOTTOM) AddToggleOptionST("HousebEnabledState", "Toggle House Tax", HousebEnabled.GetValue()) AddToggleOptionST("HorsebEnabledState", "Toggle Horse Tax", HorsebEnabled.GetValue()) AddToggleOptionST("DebtbEnabledState", "Toggle Debt System", DebtbEnabled.GetValue()) AddToggleOptionST("BountiesEnabledState", "Toggle Bounties", BountiesEnabled.GetValue()) AddToggleOptionST("ImmersiveTaxPayEnabledState", "Toggle Immersive Taxing", ImmersiveTaxPay.GetValue()) AddSliderOptionST("TaxTimeState", "Time Between Tax Days", TaxTime.GetValue()) AddSliderOptionST("HorseTaxState", "Horse Cost", HorseTax.GetValue()) AddSliderOptionST("HouseTaxState", "House Cost", HouseTax.GetValue()) AddTextOptionST("AddSTGuidebookState", "Add Guidebook", "Add Guidebook") AddTextOptionST("ManualIncrementState", "Mods", "Add Compatibility") EndIfEndEventState HousebEnabledStateEvent OnDefaultST() SetToggleOptionValueST(true)EndEventEvent OnHighlightST() SetInfoText("Toggle house property tax.") EndEventEvent OnSelectST() If HousebEnabled.GetValue() == 1.0 HousebEnabled.SetValue(0.0) ElseIf HousebEnabled.GetValue() == 0.0 HousebEnabled.SetValue(1.0) EndIf SetToggleOptionValueST(HousebEnabled.GetValue())EndEventEndStateState HorsebEnabledStateEvent OnDefaultST() SetToggleOptionValueST(1.0)EndEventEvent OnHighlightST() SetInfoText("Toggle horse boarding cost.")EndEventEvent OnSelectST() If HorsebEnabled.GetValue() == 1.0 HorsebEnabled.SetValue(0.0) ElseIf HorsebEnabled.GetValue() == 0.0 HorsebEnabled.SetValue(1.0) EndIf SetToggleOptionValueST(HorsebEnabled.GetValue())EndEventEndStateState DebtbEnabledStateEvent OnDefaultST() SetToggleOptionValueST(true)EndEventEvent OnHighlightST() If DebtbEnabled.GetValue() SetInfoText("Toggle the debt system.\n Read the guidebook for an explanation of the debt system.") EndIfEndEventEvent OnSelectST() If DebtbEnabled.GetValue() == 1.0 DebtbEnabled.SetValue(0.0) ElseIf DebtbEnabled.GetValue() == 0.0 DebtbEnabled.SetValue(1.0) EndIf SetToggleOptionValueST(DebtbEnabled.GetValue())EndEventEndStateState BountiesEnabledStateEvent OnDefaultST() SetToggleOptionValueST(true)EndEventEvent OnHighlightST() SetInfoText("Toggle bounties when refusing to pay taxes.") EndEventEvent OnSelectST() If BountiesEnabled.GetValue() == 1.0 BountiesEnabled.SetValue(0.0) ElseIf BountiesEnabled.GetValue() == 0.0 BountiesEnabled.SetValue(1.0) EndIf SetToggleOptionValueST(BountiesEnabled.GetValue())EndEventEndStateState ImmersiveTaxPayEnabledStateEvent OnDefaultST() SetToggleOptionValueST(true)EndEventEvent OnHighlightST() SetInfoText("Toggle immersive taxing.\n When on, a tax collector will come find you to gather taxes.\n If off, money will be deducted from your inventory automatically.") EndEventEvent OnSelectST() If ImmersiveTaxPay.GetValue() == 1.0 ImmersiveTaxPay.SetValue(0.0) ElseIf ImmersiveTaxPay.GetValue() == 0.0 ImmersiveTaxPay.SetValue(1.0) EndIf SetToggleOptionValueST(ImmersiveTaxPay.GetValue())EndEventEndStateState TaxTimeStateEvent OnDefaultST() SetSliderOptionValueST(168.0)EndEventEvent OnHighlightST() SetInfoText("Change the time between tax days.\n Based on in-game hours.\n 24 = 1 day, 168 = 1 week, 720 = 1 month.")EndEventEvent OnSliderOpenST() SetSliderDialogStartValue(TaxTime.GetValue()) SetSliderDialogDefaultValue(168) SetSliderDialogRange(24, 720) SetSliderDialogInterval(24)EndEventEvent OnSliderAcceptST(float value) TaxTime.SetValue(value) SetSliderOptionValueST(TaxTime.GetValue())EndEventEndStateState HorseTaxStateEvent OnDefaultST() SetSliderOptionValueST(40.0) EndEventEvent OnHighlightST() SetInfoText("Change the boarding cost for horses.")EndEventEvent OnSliderOpenST() SetSliderDialogStartValue(HorseTax.GetValue()) SetSliderDialogDefaultValue(40) SetSliderDialogRange(5, 2000) SetSliderDialogInterval(1)EndEventEvent OnSliderAcceptST(float value) HorseTax.SetValue(Value) SetSliderOptionValueST(HorseTax.GetValue())EndEventEndStateState HouseTaxStateEvent OnDefaultST() SetSliderOptionValueST(150.0) EndEventEvent OnHighlightST() SetInfoText("Change the tax cost for houses.")EndEventEvent OnSliderOpenST() SetSliderDialogStartValue(HorseTax.GetValue()) SetSliderDialogDefaultValue(150) SetSliderDialogRange(5, 2000) SetSliderDialogInterval(1)EndEventEvent OnSliderAcceptST(float value) HouseTax.SetValue(value) SetSliderOptionValueST(HouseTax.GetValue())EndEventEndStateState AddSTGuidebookState Event OnHighlightST() SetInfoText("If you've lost the Simple Taxes guidebook, or just feel like spamming your inventory with weightless books...\n Just click this.")EndEventEvent OnSelectST() SetTextOptionValueST("Giving Guidebook...") Game.GetPlayer().AddItem(STGuidebook, 1) Utility.WaitMenuMode(1.0) SetTextOptionValueST("Add Guidebook")EndEventEndStateState ManualIncrementState Event OnHighlightST() SetInfoText("If you select this, once you've left the MCM, a messagebox will pop up.\n This allows you to manually add a house or horse to your taxes, to allow for compatibility with mod-added houses/horses.")EndEventEvent OnSelectST() If ShowCompMes == 0 SetTextOptionValueST("Exit MCM") ShowCompMes = 1 Utility.Wait(0.5) SetTextOptionValueST("Add Compatibility") int option = ChangeCountMes.Show() while (option) ;(until the user chooses "exit"...) if (option == 1) while (option) option = ChangeCountHouseMes.Show() if (option == 1) Game.IncrementStat("Houses Owned", 1) elseif (option == 2) Game.IncrementStat("Houses Owned", -1) endif endWhile elseif (option == 2) while (option) option = ChangeCountHorseMes.Show() if (option == 1) Game.IncrementStat("Horses Owned", 1) elseif (option == 2) Game.IncrementStat("Horses Owned", -1) endif endWhile endif option = ChangeCountMes.Show() endWhile ShowCompMes = 0 EndIfEndEventEndState
If it affects it at all, scripts 1 and 2 are both from Mod A, wheres the script 3 is from Mod B.