In a free translation, the last line means:
"the last thing I managed to read before the crash was the number 2."
And the reason is slightly above, that the trigger for the new day expects the second parameter to be a string with the function name, and you have a number 2 there.
Added 8 hours 58 minutes ago
Help, I've rewritten the script almost 10 times.
function EndRain()
if GetDate(3) ==2 then
print("OK");
SetAmbientLight(GROUND, 'Default');
print("OK2");
end
end
Trigger(NEW_DAY_TRIGGER, "EndRain");
everything works fine, but the command
SetAmbientLight(GROUND, 'Default');
the game doesn't want to execute, but the command print("OK2")
works perfectly.
I tried to use the FAQ, but it didn't help.
can you at least provide an example script?