Arrays
#1

Here's the deal.
I'm making an array, like. new Weathers[][] = { {"Sunny", 0, 23} };
"Sunny", obviously the weather type. 0, the weather ID. 23 the Degrees.

Every 10 minutes (Timer) change the weather to something random. But the problem is, the weather could be "Foggy", but the weatherid could be like hot. I need it to be a random line, not completely different thing.
http://pastebin.com/d5756d326]
http://pastebin.com/d5756d326
Reply
#2

Code:
new
  index = random(sizeof(Weathers[]));
SetWeather(Weathers[index][1+random(1)]);
//send(...,Weathers[index][0]);
Reply
#3

I don't think you understand what the two numbers are...

http://pastebin.com/f742d17c6
Reply
#4

Quote:
Originally Posted by Dabombber
I don't think you understand what the two numbers are...

http://pastebin.com/f742d17c6
My failed, remove random(1) will be right in my edtion.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)