Welp, I use basic math formulas everywhere in the skins as well. It looks that the most proper resolution would be disabling or hiding stuff until things get properly initialized. It just requires changing the construction design of a skin. For now I will live with a dummy meter but will find for it some task so it actually contributes to the skin ahaha.Yincognito wrote: ↑April 21st, 2021, 3:17 pm Ok, I found the culprit, but not sure if I should be happy about it: it's Rainmeter's formula parser. For example, this:
X=([&ObjIcon[#CURRENTSECTIONINDEX]:XW])
will produce the stupid error on skin refresh, but this (notice the lack of round brackets):
X=[&ObjIcon[#CURRENTSECTIONINDEX]:XW]
will not. So, as long as you don't add, subtract, multiply, divide, etc. the thing, you can skip the round brackets and lo and behold, it's error free, LMAO. Obviously, on a superficial look (not dwelling into technicalities) this doesn't make any sense, but...
I remember talking a while ago with Brian about other slight (and somewhat related) inconveniences regarding Rainmeter's formula parser (possibly in conjunction with the nested syntax, but I'm not sure it was that too), and, as far as I recall, there wasn't what you'd call a nice solution then either, so I'm afraid we have to live with it. There is this small possibility that one of the developers will come up with a workaround that escaped us, but I wouldn't count on it...
P.S. This is unfortunate, because I too like to use round brackets in such options, even though there isn't any operation going on - just in case I need to insert one later on in the skin development process.
EDIT: I believe this behavior has something to do with the Important Final Note section from the Inline Lua Notes in the manual. Apart from the error appearing only in a formula, the fact that initial errors due to the order of operations in Rainmeter and Lua at skin refresh time is quite comprehensively alluded to. This is pretty much what happens here. All in all, it's just an initial error with 0 impact on the actual result and behavior, at least starting with the time the skin has finished running its refresh mechanism and is "completely" loaded.
I have seen your JSON reading and writing skin but I without a test skin I am quite unable to check it out. The other day I was thinking to make a desktop planner and JSON seemed to be a better solution for storing, reading and writing all the data.