random
#1

Hello!

I wanna create random lotto numbers from 1-10. So i created this:

Код:
new Int:RandomLottoNumbers; //line 37
RandomLottoNumbers = random(10)+1;
But now, the compiler writes this:

Код:
\filterscripts\lotto.pwn(37) : warning 213: tag mismatch
What's the problem with this? Please reply

Thanks
Nonameman

Reply
#2

Why Int: ? lol.
new RandomLottonumbers; is all you need.
Reply
#3

Because I want to collate this random value with an integer value.
But then ok, and thanks a lot

Now my compiler write that it's still wrong, cannot collate the 2 values
Reply
#4

What is the error?
Reply
#5

I checked it again, and found the mistake, so now it's perfect
Reply
#6

Remember that you can do such thing as
Код:
 RandomLottoNumbers = random(10)+1;
if your not in a callback?
Reply
#7

pawn Код:
RandomLottoNumbers = RandomEx(10);
pawn Код:
//Place at the bottom of your script
stock RandomEx(max)
{
return random(max * 100) / 100;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)