15.01.2024, 10:26
Do you have snowsum = 0 before the repeat loop? What is the exact error that you get?
openweather ONE call API
|
15.01.2024, 10:26
Do you have snowsum = 0 before the repeat loop? What is the exact error that you get?
15.01.2024, 10:29
15.01.2024, 10:32
Try this:
Code: 123456789 snowsum = 0
for i = 1, 24 do
hourly = data.hourly[i]
if hourly.snow then
snowsum = snowsum + (hourly.snow['1h'] or 0)
end
end
15.01.2024, 10:36
|
« Next Oldest | Next Newest »
|