Need urgent help (about arrays)
#5

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
oh thatt for that do like this
pawn Код:
new rand = random(sizeof(g_Fishes));
new var = g_Fishes[rand][2]-g_Fishes[rand][1];
new randweight = random(var) + var;
//now use randweight as random weight it will be between minimum and maximum always :D
Thank you for replying again, but another error:
pawn Код:
error 033: array must be indexed (variable "g_Fishes")
On line:
pawn Код:
new var = g_Fishes[rand][2]-g_Fishes[rand][1];
Reply


Messages In This Thread
Need urgent help (about arrays) - by greentarch - 30.06.2014, 14:20
Re: Need urgent help (about arrays) - by BroZeus - 30.06.2014, 14:25
Re: Need urgent help (about arrays) - by greentarch - 30.06.2014, 14:30
Re: Need urgent help (about arrays) - by BroZeus - 30.06.2014, 14:38
Re: Need urgent help (about arrays) - by greentarch - 30.06.2014, 14:42
Re: Need urgent help (about arrays) - by BroZeus - 30.06.2014, 14:50
Re: Need urgent help (about arrays) - by greentarch - 30.06.2014, 14:54

Forum Jump:


Users browsing this thread: 5 Guest(s)