mIRC Home    About    Download    Register    News    Help

Print Thread
#192636 06/01/08 04:56 PM
Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
this is just a small question but how do u add x number of items for a number::
example

if %g = 5 then write 100000

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
In your example, what do you want to write? Where?

-genius_at_work

Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
write where and to what?

if %g == 5 { command }

Joined: Feb 2006
Posts: 523
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 523
$str(0,%g) ? or perhaps

Code:
//var %g = 5, %x = 10 ^ %g | echo -a %x



"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
i want to write a x number of zeros behind a 1 for the number of decimal places(its an identifier)

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
Use exponents, as in the example above.

Code:

//echo -a $calc(10 ^ %g)



-genius_at_work

Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Jaytea already gave the answer I think...

//var %g = 5, %x = 1 | echo -a $+(%x,$str(0,%g))

Returns: 100000

Take a look at: /help $str

Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
i know $str, just forgot it lol. does anyone know why its $str and not $rep or something lol

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Because you're adding a $string of characters. As far as why you don't consider it repeating the characters, I don't really know... Khaled had to pick one and he chose $str.

Riamus2 #192661 06/01/08 09:19 PM
Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
i knw it ment string but i dont know how that is better than $ran or something lol

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
What is $ran?

hixxy #192664 06/01/08 09:51 PM
Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
lol, nothing i typed that wrong i ment $rep and im just saying that it should be called that then $str

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Too late to change it, so just accept it as-is. Besides, I think other languages use similar.


Link Copied to Clipboard