Troubleshooting

Troubleshooting

In this section, we will address some common issues you might encounter while using b2_weatherEssentials and provide solutions to help you resolve them.

Table of Contents

  1. Installation Issues

  2. Configuration Issues

  3. Weather Sync Issues

  4. Time Sync Issues

  5. Live Weather Integration Issues

  6. Extreme Weather Events Issues

  7. Blackout Issues

  8. Voting System Issues

  9. General Debugging Tips


Installation Issues

Issue: Resource Not Starting

Symptoms:

  • The resource does not start when the server is launched.

  • You see error messages related to b2_weatherEssentials in the console.

Solutions:

  1. Ensure that the b2_weatherEssentials folder is placed correctly in the resources directory.

  2. Verify that ensure b2_weatherEssentials is added to your server.cfg file.

  3. Check for any typos in the resource folder name or the server.cfg entry.

Configuration Issues

Issue: Invalid Weather Type

Symptoms:

  • Admin commands return "Invalid weather type" errors.

  • Weather does not change as expected.

Solutions:

  1. Verify that the weather types specified in config.lua match the valid FiveM weather types.

  2. Ensure that the weather types are written in uppercase.

Issue: Configuration Changes Not Applying

Symptoms:

  • Changes made in config.lua do not take effect.

Solutions:

  1. Restart the server after making changes to config.lua.

  2. Check for syntax errors in config.lua that might prevent the script from loading correctly.

Weather Sync Issues

Issue: Weather Not Synchronizing Across Players

Symptoms:

  • Players see different weather conditions.

  • Weather changes do not propagate to all clients.

Solutions:

  1. Ensure that weather synchronization is enabled using exports.b2_weatherEssentials:EnableWeatherSync().

  2. Check for any errors in the server and client logs related to weather synchronization.

  3. Verify that there are no conflicting weather scripts running on the server.

Time Sync Issues

Issue: Time Not Synchronizing with Server Time

Symptoms:

  • In-game time does not match the server's real-world time.

  • Time changes do not apply to all players.

Solutions:

  1. Ensure that time synchronization is enabled using exports.b2_weatherEssentials:EnableTimeSync().

  2. If using real-time synchronization, verify that Config.UseRealTime is set to true in config.lua.

  3. Check for any errors in the server and client logs related to time synchronization.

Live Weather Integration Issues

Issue: Live Weather Data Not Fetching

Symptoms:

  • The in-game weather does not match real-world weather conditions.

  • Errors related to fetching weather data appear in the logs.

Solutions:

  1. Verify that Config.UseLiveWeather is set to true in config.lua.

  2. Ensure that the correct latitude and longitude are provided in config.lua.

  3. Check for any errors in the server logs related to HTTP requests.

  4. Verify that the server has internet access to reach the Open-Meteo API.

Extreme Weather Events Issues

Issue: Extreme Events Not Triggering

Symptoms:

  • Commands to trigger extreme events do not work.

  • No changes occur when attempting to trigger an event.

Solutions:

  1. Ensure that the extreme event is enabled in Config.ExtremeEvents.

  2. Check for any errors in the server and client logs related to extreme events.

  3. Verify that the command syntax is correct (e.g., /extremeevent EARTHQUAKE).

Blackout Issues

Issue: Blackouts Not Working

Symptoms:

  • Commands to trigger or clear blackouts do not work.

  • No changes occur when attempting to trigger a blackout.

Solutions:

  1. Check for any errors in the server and client logs related to blackout events.

  2. Ensure that isBlackout is being set correctly in the script.

  3. Verify that the command syntax is correct (e.g., /blackout and /clearblackout).

Voting System Issues

Issue: Voting System Not Starting

Symptoms:

  • Voting sessions do not begin as scheduled.

  • Players cannot vote for weather changes.

Solutions:

  1. Ensure that Config.EnableVotingSystem is set to true in config.lua.

  2. Check for any errors in the server and client logs related to the voting system.

  3. Verify that the server is running without any conflicts from other scripts that may interfere with voting.

Issue: Votes Not Counting

Symptoms:

  • Votes do not get registered during voting sessions.

  • Players receive errors when trying to vote.

Solutions:

  1. Ensure that the voting session is active when players are attempting to vote.

  2. Check for any errors in the server and client logs related to vote handling.

  3. Verify that players are using the correct command syntax (e.g., /weathervote CLEAR).

General Debugging Tips

  1. Enable Debugging:

    • Set Config.Debugging to true in config.lua to enable detailed debug output in the server and client logs.

  2. Check Logs:

    • Review the server and client logs for any error messages or warnings. These logs can provide valuable information about what might be going wrong.

  3. Verify Dependencies:

    • Ensure that all required dependencies (such as b2_vehicleEssentials if used) are installed and running correctly.

  4. Test in Isolation:

    • Disable other scripts temporarily to see if the issue persists. This can help identify if there are conflicts with other resources.

  5. Update Resources:

    • Make sure you are using the latest version of b2_weatherEssentials and any related dependencies.

  6. Reach Out for Support:

    • If you are unable to resolve an issue, join our Discord server for support: B2Scripts Discord

Last updated