Generate random
#9

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
but the seperator isn't on 5,10,15 it is on index 4,9,14, so you should do
pawn Код:
if(i % 5 == 4)
also I am unsure why you used a switch instead of an if
pawn Код:
new rand = random(36);
// something like that
str[i] = rand + ((rand < 10) ? (48) : (55));
I was just trying to make it easy for him to understand the code honestly, in a way that I could type it on my work tablet which wasn't too terrible, but good points xD
Reply


Messages In This Thread
Generate random - by SymonClash - 28.03.2019, 20:44
Re: Generate random - by TokicMajstor - 28.03.2019, 23:11
Re: Generate random - by Crayder - 29.03.2019, 03:07
Re: Generate random - by TheToretto - 29.03.2019, 08:22
Re: Generate random - by SymonClash - 29.03.2019, 08:24
Re: Generate random - by bgedition - 29.03.2019, 16:45
Re: Generate random - by Crayder - 30.03.2019, 06:50
Re: Generate random - by Nero_3D - 30.03.2019, 12:00
Re: Generate random - by Crayder - 30.03.2019, 16:31

Forum Jump:


Users browsing this thread: 1 Guest(s)