![]() |
Question About Random
Can random be used with letters somehow? Ex:
PHP Code:
|
Re: Question About Random
Quote:
|
~AlphaFlame~
Of course that doesn't work if you're talking about variables. You're asking it for a random from a to z, not the value of variable a to variable z. That would be random(#v(a),#v(b)) I believe. |
It cannot be used with letters unless you use some special scripting, E.G this:
NPC Code: And AlphaFlame, random is a function which uses variables so it doesn't need the #v |
you could make a string 26 characters long with the alphabet, then use the random for 1 through 26 and do a part string with that number
|
it seems i posted a little too slow :)
|
Quote:
NPC Code: not much shorter but better |
so ....
Quote:
NPC Code: A letter between A and Z might appear ? |
or you could do this:
NPC Code: |
~AlphaFlame~
My apologies then, btedji. I personally don't use variables with random... too much trouble really. And yes, use btedji's letter script. It works. Though I can't see why you need a random letter... |
can make it a random hole number then assign all letters to a #
like 1 = a 2 = b etc. |
Quote:
|
then kammy why not just tell the person who asked how to do it with #k... instead of saying all you rejects #k is better...
|
Quote:
|
Quote:
|
Ok, thanks for the help everyone...I'll have to mess around with #K sometime.
|
| All times are GMT +2. The time now is 02:19 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.