It is currently October 13th, 2024, 7:02 am

Enigma Calendar Script Error

Discuss the use of Lua in Script measures.
User avatar
CrushBug
Posts: 10
Joined: November 8th, 2021, 4:19 pm

Re: Enigma Calendar Script Error

Post by CrushBug »

Agreed with death.crafter. Better to be safe and protect your systems. This is why I provided the zip without the exes inside, and the VirusTotal links. Also, since it is a zip, there isn't anything that can happen just by downloading a zip. Once you have it you can do any virus scanning on the package before opening it as you see fit.

Back to the error. It is pretty weird, as I have been running Enigma and its calendar for years and it has never had any problems. This feels like some sort of data error that is breaking it. I know the calendar highlights holidays and such. I don't know where that data comes from.
User avatar
death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm

Re: Enigma Calendar Script Error

Post by death.crafter »

CrushBug wrote: November 9th, 2021, 12:32 am Agreed with death.crafter. Better to be safe and protect your systems. This is why I provided the zip without the exes inside, and the VirusTotal links. Also, since it is a zip, there isn't anything that can happen just by downloading a zip. Once you have it you can do any virus scanning on the package before opening it as you see fit.

Back to the error. It is pretty weird, as I have been running Enigma and its calendar for years and it has never had any problems. This feels like some sort of data error that is breaking it. I know the calendar highlights holidays and such. I don't know where that data comes from.

Can you link to the original skin? And possibly give the pastebin of the lua script?
from the Realm of Death
User avatar
SilverAzide
Rainmeter Sage
Posts: 2746
Joined: March 23rd, 2015, 5:26 pm

Re: Enigma Calendar Script Error

Post by SilverAzide »

Enigma is here: https://www.deviantart.com/kaelri/art/Enigma-103823591

I think Enigma uses a very old version of Smurfier's LuaCalendar. The holidays are in a config file.
Gadgets Wiki GitHub More Gadgets...
User avatar
CrushBug
Posts: 10
Joined: November 8th, 2021, 4:19 pm

Re: Enigma Calendar Script Error

Post by CrushBug »

SilverAzide wrote: November 9th, 2021, 2:42 am Enigma is here: https://www.deviantart.com/kaelri/art/Enigma-103823591

I think Enigma uses a very old version of Smurfier's LuaCalendar. The holidays are in a config file.
Thank you for this comment about the holidays being in a config file! I have never touched the file before, but deleting a number of lines has allowed the calendar to load again.

Enigma\@Resources\User\Calendars\Holidays.xml

I am going to slowly re-add lines to see if I can figure out what, exact entry mucked it all up.
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Enigma Calendar Script Error

Post by balala »

CrushBug wrote: November 8th, 2021, 9:23 pm Enigma-CrushBug-NoExes.zip - GDrive link:
https://drive.google.com/file/d/12e5N2uK49E3B082LsC1pJvzIYNh8s7fU/view?usp=sharing

Enigma-CrushBug-NoExes.zip - VirusTotal results:
https://www.virustotal.com/gui/file/926d1bd49c4ef004cd3dc29afd5c2ad496a25c47fbc9ccde8f7e8d8475495ada?nocache=1

Hope this works.
Yep, it does. Downloaded it alright.
death.crafter wrote: November 9th, 2021, 12:12 am If you are using Microsoft Edge and the skin includes RainFocus.exe, Edge would flag it as virus and wouldn't let you download it.
You're right, Edge is exactly what am I using.
CrushBug wrote: November 9th, 2021, 5:01 am but deleting a number of lines has allowed the calendar to load again.

Enigma\@Resources\User\Calendars\Holidays.xml

I am going to slowly re-add lines to see if I can figure out what, exact entry mucked it all up.
So the skin has started working again? Is it alright now?
User avatar
CrushBug
Posts: 10
Joined: November 8th, 2021, 4:19 pm

Re: Enigma Calendar Script Error

Post by CrushBug »

balala wrote: November 9th, 2021, 4:45 pm So the skin has started working again? Is it alright now?
Yes, it seems to be a data interaction error in Holidays.xml and the current way the calendar displays November 2021. I still want to find the exact line, so others can know. I should have that done today.
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Enigma Calendar Script Error

Post by balala »

CrushBug wrote: November 9th, 2021, 4:50 pm Yes, it seems to be a data interaction error in Holidays.xml and the current way the calendar displays November 2021. I still want to find the exact line, so others can know. I should have that done today.
I'm glad in this case, even if this time not me was the one who helped you.
User avatar
CrushBug
Posts: 10
Joined: November 8th, 2021, 4:19 pm

Re: Enigma Calendar Script Error

Post by CrushBug »

Ah, but you replied and it was most appreciated.

This is the line that was breaking it, in the Holidays.xml file.

Code: Select all

<Event Day="({FirstMon}+1)*(({Year}%2)=0)" Desc="Election Day"/>
I deleted the line and now it works. Since I believe this is an American thing and I am in Canada, I got rid of it.

Hope this helps others!
User avatar
balala
Rainmeter Sage
Posts: 16651
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Enigma Calendar Script Error

Post by balala »

CrushBug wrote: November 9th, 2021, 5:39 pm I deleted the line and now it works. Since I believe this is an American thing and I am in Canada, I got rid of it.

Hope this helps others!
For sure, deleting that line fixed the error for me as well. Good job, congratulations.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2746
Joined: March 23rd, 2015, 5:26 pm

Re: Enigma Calendar Script Error

Post by SilverAzide »

CrushBug wrote: November 9th, 2021, 5:39 pm Ah, but you replied and it was most appreciated.

This is the line that was breaking it, in the Holidays.xml file.

Code: Select all

<Event Day="({FirstMon}+1)*(({Year}%2)=0)" Desc="Election Day"/>
I deleted the line and now it works. Since I believe this is an American thing and I am in Canada, I got rid of it.

Hope this helps others!
I don't know if the older versions of LuaCalendar use the same syntax as the more recent versions, but if so, the formula should be:

(({$FirstMon}+1)*(({$Year}%2)=0))

I'm not sure why Smurfier added an extra set of parentheses around the whole expression (maybe it is needed?), but in any case, this is the current code. (For anyone in the U.S. who cares to fix this bug.)
Gadgets Wiki GitHub More Gadgets...