jucoking Posted December 2, 2018 Share Posted December 2, 2018 Hello all, I'm having issues scripting a message that displays on-screen at 6am and a different message that displays on-screen at 6pm. The messages need to display everyday and it doesn't matter where the player is located. I was fiddling around with the sanguinaris vampiris script and came across something that looked like what I was trying to accomplish, so I hijacked it and modified it for my own use (luckily, my mod requires a similar disease, so I can just tack the message script onto the magic effect). Here is the script I was trying to use (that won't compile): Scriptname DayNightMsg extends activemagiceffect Event OnUpdateGameTime() If GameHour.GetValueInt() == 6 00CV2_MorningSunMessage.Show() EndIf If GameHour.GetValueInt() == 18 00CV2_HorribleNightMessage.Show() EndIf EndEventMessage Property 00CV2_MorningSunMessage AutoMessage Property 00CV2_HorribleNightMessage AutoGlobalVariable Property Gamehour AutoGlobalVariable Property GameDaysPassed Auto Here is the error I get when attempting to compile this script: Starting 1 compile threads for 1 files...Compiling "DayNightMsg"...C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\DayNightMsg.psc(6,4): required (...)+ loop did not match anything at input 'CV2_MorningSunMessage'C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\DayNightMsg.psc(10,4): required (...)+ loop did not match anything at input 'CV2_HorribleNightMessage'C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\DayNightMsg.psc(15,17): no viable alternative at input '00'C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\DayNightMsg.psc(15,45): mismatched input '\\r\\n' expecting STATEC:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\DayNightMsg.psc(17,48): mismatched input '\\r\\n' expecting STATENo output generated for DayNightMsg, compilation failed. Link to comment Share on other sites More sharing options...
DarkRudra Posted December 2, 2018 Share Posted December 2, 2018 You can't start variable/property/etc names with a digit. Instead of "00CV2_MorningSunMessage" use "CV2_MorningSunMessage" and so on. https://www.creationkit.com/index.php?title=Identifier_Reference Link to comment Share on other sites More sharing options...
jucoking Posted December 2, 2018 Author Share Posted December 2, 2018 You can't start variable/property/etc names with a digit. Instead of "00CV2_MorningSunMessage" use "CV2_MorningSunMessage" and so on. https://www.creationkit.com/index.php?title=Identifier_ReferenceThank you for the prompt reply. I followed your advice and the script compiled successfully, however, the notification doesn't appear during testing. I even replaced the "message.show()" with a "debug.messagebox()" and it compiles fine but doesn't call the script in-game. It really doesn't matter how the message appears during play, just as long as it's in the HUD somewhere. Any help would be much appreciated. Link to comment Share on other sites More sharing options...
Recommended Posts