Random weather and worldtime
#1

hi,
after every round the map changes and so the world time and weather does.
Ive created a random world and weather setter function.
It works but sometimes there seem to be some kind of strange weather/time combinations.(see the attached pics)
You cant see anything then, it does not happen often but its annoying.
Could someone maybe tell me the error in my code causing this bug?

pawn Код:
//random weather ID's
new const RandomWeather[43][1] =  
{
    {1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16},{17},{18},{19},{23},{24},{25},
    {26},{27},{28},{29},{30},{31},{32},{34},{35},{36},{37},{38},{39},{40},{41},{42},{46},{47},{48},{49},{50}
};

//random world time
new const RandomWorldTime[24][1] =
{
    {0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16},{17},{18},{19},{20},{21},{22},{23}

};

//This is the random setter function

//for weather
new rw = random(sizeof RandomWeather);
SetWeather(RandomWeather[rw][0]);

//for world time
new rwt = random(sizeof RandomWorldTime);
SetWorldTime(RandomWorldTime[rwt][0]);
Reply


Messages In This Thread
Random weather and worldtime - by BlackWolf120 - 06.02.2011, 16:45
Re: Random weather and worldtime - by Matej_ - 06.02.2011, 16:50
Re: Random weather and worldtime - by Mean - 06.02.2011, 16:54
Re: Random weather and worldtime - by BlackWolf120 - 06.02.2011, 16:58
Re: Random weather and worldtime - by dice7 - 06.02.2011, 17:48
Re: Random weather and worldtime - by BlackWolf120 - 06.02.2011, 17:58
Re: Random weather and worldtime - by BlackWolf120 - 06.02.2011, 18:39

Forum Jump:


Users browsing this thread: 1 Guest(s)