Juqt a small question about random func
#2

I really doubt it's working in game. And why creating 2 dimensions if you only use one? Learning from GF? Bad idea.

Actually you never use RandomMaleSkin or the other (you only use it in sizeof which is evaluated when compiling), so it show these warnings.

pawn Код:
stock RandomSkin(playerid)
{
  if(PlayerInfo[playerid][pSex] == 1)
  {
    new RandomMaleSkin[] = { 60, 66, 101, 128, 170, 180, 188 };
    new rand = RandomMaleSkin[random(sizeof(RandomMaleSkin))];
    SetPlayerSkin(playerid, rand);
  }
  else
  {
    new RandomFemaleSkin[] = { 56, 69, 93, 141, 150, 191, 193 };
    new rand = RandomFemaleSkin[random(sizeof(RandomFemaleSkin))];
    SetPlayerSkin(playerid, rand);
  }
}
Reply


Messages In This Thread
Juqt a small question about random func - by Coicatak - 09.07.2009, 18:20
Re: Juqt a small question about random func - by yom - 09.07.2009, 18:26
Re: Juqt a small question about random func - by Coicatak - 09.07.2009, 18:53

Forum Jump:


Users browsing this thread: 2 Guest(s)