random problem
#7

Try:
pawn Код:
new
    sl,
    rd[]= { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };

new
    rand = random(sizeof(rd));
sl = rd[rand];
printf("%c Pos: %d", sl, rand);
pawn Код:
new
    sl[2],
    rd[26][] =
{
    "A", "B", "C", "D", "E", "F", "G", "H", "I","J","K","L","M","N", "O","P","Q","R","S","T","U","V","W","X","Y","Z"
};

new
    rand = random(sizeof(rd));
sl = rd[rand]; // 'B' '\0' 2 cells
printf("%s Pos: %d", sl, rand);
Reply


Messages In This Thread
random problem - by vuch_hovi - 27.07.2010, 12:19
Re: random problem - by vuch_hovi - 27.07.2010, 12:50
Re: random problem - by Shadow™ - 27.07.2010, 14:00
Re: random problem - by vuch_hovi - 27.07.2010, 23:39
Re: random problem - by Kar - 27.07.2010, 23:46
Re: random problem - by vuch_hovi - 27.07.2010, 23:48
Re: random problem - by smeti - 27.07.2010, 23:58
Re: random problem - by vuch_hovi - 28.07.2010, 11:41

Forum Jump:


Users browsing this thread: 1 Guest(s)