Code: Select all
if magnitude == "" then magnitude = "0" end
Code: Select all
local magnitude = fields[11] or "0"Moderator: leecollings
Code: Select all
if magnitude == "" then magnitude = "0" end
Code: Select all
local magnitude = fields[11] or "0"My first thought is that if something is missing you can't just give it a value (0) unless it's very clear that it's a dummy number.Kedi wrote: Friday 12 December 2025 19:32 You might addCode: Select all
if magnitude == "" then magnitude = "0" end
I now had the time for a closer look.otherwise I get an error later on if field[11] is empty
He called it a NEW script and indeed he made drastic changes, but left my name in top. Unfortunately, this was not accompanied by any explanation. Nor was a reason given for a different URL. At first glance, I noticed that the existence of the alert device was being checked every minute. While that is certainly robust, I found it a bit redundant. Furthermore, I did not understand the reason for the different URL. And since everything was working fine for me, I did not really feel motivated to investigate.Here is a new Earthquake script with more robust error handling and a new URL.
Users browsing this forum: No registered users and 1 guest