problems setting up a timer.
#1

Hey there!!!
I am trying to use Mick88' s Weather Streamer on my server. I have already implemented those functions on my game mode and they work fine. But now I am trying to put them on a timer and I keep getting these "tag mismatch" warnings. Can someone help me with them?

The timer code is below.Careful, you'll have to get Mick's streamer include, for reading the weather area functions.

Код:
#include <a_samp>
#include <WeatherStreamer>

new Float:WeatherBC[][] = {(42), (17), (3), (9), (40)}; //Bone County
new Float:WeatherTR[][] = {(42), (17), (3), (9), (40)}; // Tierra Robada
new Float:WeatherRC[][] = {(8), (16), (9), (32), (40)}; // Red County
new Float:WeatherFC[][] = {(8), (16), (9), (32), (40)}; // Flint County
new Float:WeatherWS[][] = {(8), (16), (9), (32), (40)}; // Whetstone
new Float:WeatherLS[][] = {(8), (16), (9), (32), (40)}; // Los Santos
new Float:WeatherSF[][] = {(8), (16), (9), (32), (40)}; // San Fierro
new Float:WeatherLV[][] = {(8), (16), (9), (32), (40)}; // Las Venturas

forward weather();
public weather()
{
    new LSW = random(sizeof(WeatherLS));
    new SFW = random(sizeof(WeatherSF));
    new LVW = random(sizeof(WeatherLV));
    new BCW = random(sizeof(WeatherBC));
    new TRW = random(sizeof(WeatherTR));
    new RCW = random(sizeof(WeatherRC));
    new FCW = random(sizeof(WeatherFC));
    new WSW = random(sizeof(WeatherWS));

    SetAreaWeather(WEATHER_AREA_LOS_SANTOS, WeatherLS[LSW][0]);
    SetAreaWeather(WEATHER_AREA_SAN_FIERRO, WeatherSF[SFW][0]);
    SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, WeatherLV[LVW][0]);
    SetAreaWeather(WEATHER_AREA_BONE_COUNTY, WeatherBC[BCW][0]);
    SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, WeatherTR[TRW][0]);
    SetAreaWeather(WEATHER_AREA_RED_COUNTY, WeatherRC[RCW][0]);
    SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, WeatherFC[FCW][0]);
    SetAreaWeather(WEATHER_AREA_WHETSTONE, WeatherWS[WSW][0]);
}
Reply
#2

try using a other weather system
Reply
#3

Right now I don't think it's the weather system anymore. I did something wrong with the random functions.
Besides, there is no other weather system like this one.
Reply
#4

random() takes integers only, but you declared the weather-ids as floats:
Код:
new Float:WeatherBC[][] = {(42), (17), (3), (9), (40)}; //Bone County
this should be
Код:
new WeatherBC[][] = {(42), (17), (3), (9), (40)}; //Bone County
indeed.. change the others too..
Reply
#5

Aaaand they're gone. Warnings from 20 to 0.
So all ID's should be declared as integers, regardless of what they describe?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)