Without the ApiKey.mworsnop wrote:Here is the complete INI and LUA.
It is currently April 19th, 2024, 11:55 am
LUA data is nil
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
-
- Posts: 16
- Joined: December 14th, 2017, 1:20 am
Re: LUA data is nil
Yes I left that out as its registered to me. I will send you my key in PM
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: LUA data is nil
I'm sorry, but something is still going wrong. Loading your skin with the given variables, still gives a RegExp matching error (-1) error (about the [WeatherForecast] measure). Trying to open the posted URL in a web browser (again, replacing the variables with the appropriate given values), doesn't open anything, just this:
So, I'm not sure what's going on, maybe the needed URL isn't accessible for me (outside of US)?
Code: Select all
<?xml version="1.0"?>
-<response>
<version>0.1</version>
<termsofService>http://www.wunderground.com/weather/api/d/terms.html</termsofService>
-<features>
<feature>alerts</feature>
</features>
-<error>
<type>unknownfeature</type>
</error>
<alerts> </alerts>
</response>
-
- Posts: 16
- Joined: December 14th, 2017, 1:20 am
Re: LUA data is nil
Those errors are both correct. There are no descriptions as there are no alerts.
The URL is correct. There are no alerts right now.
But in the LUA I should be able to do the print and see the weatherData var so I can see if its working.
The URL is correct. There are no alerts right now.
But in the LUA I should be able to do the print and see the weatherData var so I can see if its working.
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: LUA data is nil
Where? I mean where would you like to see weatherData? Using the print function probably works in standalone used lua (however I never workd so, so I'm not sure), but not here. To can see the data through the Rainmeter skin, you should have to use instead of the print function a this kind of command: SKIN:Bang('!SetOption', 'MyStringMeter', 'Text', weatherData). This command sets the Text option of the [MyStringMeter] meter, which you must have in the code of your skin. Something like:mworsnop wrote:But in the LUA I should be able to do the print and see the weatherData var so I can see if its working.
Code: Select all
[MyStringMeter]
Meter=STRING
X=0
Y=0
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
-
- Posts: 16
- Joined: December 14th, 2017, 1:20 am
Re: LUA data is nil
In the LUA I would like to see weatherData print to the log. weatherData should be the data that was returned from the URL.
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: LUA data is nil
Well, I have no idea how you could send information directly from the lua script to the log of Rainmeter. From the Rainmeter skin it can be (through the !Log bang), but I doubt you could from the .lua script. I don't say precisely you can't, I say just that I don't know how. Maybe someone else how knows will come to help.mworsnop wrote:In the LUA I would like to see weatherData print to the log. weatherData should be the data that was returned from the URL.
Sorry...
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: LUA data is nil
The print() command in Lua outputs to the Rainmeter log.balala wrote:Well, I have no idea how you could send information directly from the lua script to the log of Rainmeter. From the Rainmeter skin it can be (through the !Log bang), but I doubt you could from the .lua script. I don't say precisely you can't, I say just that I don't know how. Maybe someone else how knows will come to help.
Sorry...
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: LUA data is nil
Indeed. I had no idea about this. But it indeed does.jsmorley wrote:The print() command in Lua outputs to the Rainmeter log.
Thanks for the info.