Open GuardianOfExile opened 6 years ago
Can you right-click the tray icon > "About" and post any debug messages if present?
I also appear to have this issue. I'm on version 3.8.1. Here is the output in my log:
Script: ColorChanger:107: attempt to perform arithmetic on field '?' (a string value)
!CommandMeasure: Skin "Fountain of Colors\Initialize" not found
!CommandMeasure: Skin "Fountain of Colors\Initialize" not found
I've tried refreshing, selecting other color options and then switching back. I checked the variables file to confirm I'm actually using the setting: Colors=Wallpaper
. I'm using three monitors, and the wallpaper is set by Windows, rather than a third party app.
Let me know if there's any other information I can provide.
function HorizontalInterpolation()
for i = hLowerLimit, hUpperLimit do
local c, hPosNorm = 1, hPosNorm[i]
for b = 1, 8, 2 do
for a = 1, 3 do
if type(hColorIdx[b+1][a]) == "string" then
break -- skip incoming error
end
colorIdx[i][c][a] = (hColorIdx[b][a] * (1 - hPosNorm) + hColorIdx[b+1][a] * hPosNorm)
end
c = c + 1
end
end
end
Was messing around in the code and found that hColorIdx[b+1][a] turns into a string somehow. Yes, turns, when FOC is just initialized this function works for a few calls without errors then it starts falling into ' if type(hColorIdx[b+1][a]) == "string" ' If we break here to avoid the error we find that in Update() we have the same issue
if type(colorIdx[1][a]) == "string" or not colorIdx[1][a] then
break -- skip incoming error
end
for a = 1, 3 do
color[a] = floor(colorIdx[1][a] * blendingValueRe + colorIdx[2][a] * blendingValue + 0.5)
end
Thank you for the additional info. Can you attach a link to the line in the file, where it does a string comparison? I do not see it here:
I believe this is still a wallpaper detection issue.
To-do: Fix wallpaper change detection, possibly if file content changes but location path remains the same
https://github.com/alatsombath/Fountain-of-Colors/blob/3b40f02dc8b609196fd71d0b5100398a5165dcc8/Skins/Fountain%20of%20Colors/ColorChanger#L102-L112 https://github.com/alatsombath/Fountain-of-Colors/blob/3b40f02dc8b609196fd71d0b5100398a5165dcc8/Skins/Fountain%20of%20Colors/ColorChanger#L183-L185
Sorry for not linking, first time replying in git.
I found these because of the error logs on Rainmeter posted by @progdawn, I also had them here.
Breaking out of the code like I posted above, by testing if a supposedly arithmetic value was actually a string before doing operations with it
if type(hColorIdx[b+1][a]) == "string" then break
removed the error logs (of course, it didn't fix anything, I did it just to confirm the source of the errlogs).
The string comparison was put there by me so I could do the test above (break before the error)
Ah that makes sense, I appreciate you for looking into and trying to debug the script, it was not written to the best standard at the time and needs to be rewritten eventually
Regarding updates to this issue, please refer to the following thread made on DeviantArt: https://comments.deviantart.com/1/518894563/4669035158
"Thank you for the abundance of information. I very clearly overlooked wallpapers on multi-monitors entirely, since one path to an image of course cannot reference more than one monitor
I would have begun fixing this issue sooner if it was not prioritized to fix issues with the audio plugin and restore intended timing, in addition to fixing issues regarding accessibility to the options interface
The reason why there was a change in the feature, at the beginning, was to determine the potential of using existing JavaScript libraries to extend Rainmeter ("color-thief.js" still calculates colors correctly, just needed more input)
In this case of fixing multi-monitor wallpaper color support, there is either an existing pull request to parse binary registry values, or likely I will un-retire the "Chameleon" plugin, either fix should occur by the next release"
https://github.com/socks-the-fox/Chameleon https://github.com/rainmeter/rainmeter/pull/155
In v3.8.4 wallpaper colors should now work for Windows 7 sans SP1 users. However the multi-monitor issue still needs to be resolved
I'm new to this version of FoC and everything but the Wallpaper color option is working. What should I do?