Luck_weathersync - Reallife weather sync for FiveM (Added Realtime Clock)

Ok ty i got it why it was giving me a nil

Nice script my friend.

why ?

Because I was printing it outside the function

can someone help me to install this. it dosn’t work for me…

Does This Work With This Script ? Thanks [Release] vSyncR, a better and updated version of vSync (Weather/Time)

I got this in console
Started resource luck-weathersync
SCRIPT ERROR: @luck-weathersync/server.lua:26: bad argument #1 to ‘decode’ (string expected, got nil)

userCallback (@luck-weathersync/server.lua:26)

This resource has been broken for a little bit. I’m not sure what is going on with the API, as when you access the link directly in a browser it will display the json information correctly, however when trying to print the resultData in the script it keeps coming back as nil with an errorCode of 0, it returns a table for resultHeaders, but it will not print the table for some unknown reason. It’s a shame too, but I think the API itself is blocking the requests now as I can use the openweathermap.com API and it will actually return the request properly.

Only problem is that the openweathermap.com api does not return the same information as weatherapi.com so there needs to be an overhaul on the entire script to get the weather to sync correctly using the openweathermap.com API.

hey i realy like your script but i have a little problem :confused:
the script starts normal without problems but if i am in game for example at 11pm it is not night, so its every time daytime :confused:
what can i do that its day and night same as reallife …

Thanks a lot

I will share code, you can wait.

You can download from here!

The latest version shows this error in console: SCRIPT ERROR: @luck-weathersync/server.lua:26: attempt to index a nil value

Are you set api key?

SCRIPT ERROR: @weathersync/client.lua:254: attempt to index a nill value (field ?)

How to fix?

@goodluckgod The wind sound is over powering near gates and fences

is there actually a fix for the error attempt to index a nil value ???

Can you print weatherTypee on event and post it?

SCRIPT ERROR: @weathersync/client.lua:254: attempt to index a nill value (field ?)

that’s just the error why the script doesn’t really run

1 Like

Because the api add the new types of weather, i was add all of weather types, i will update it soon.

I look the api doc and nothing changed, do you paste your api key to server config? If you paste just type print(weatherTypee) on top of weatherType = weatherTypes[weatherTypee].type and share the result with me please.