mIRC Home    About    Download    Register    News    Help

Print Thread
small question #192636 06/01/08 04:56 PM
Joined: Aug 2007
Posts: 334
foshizzle Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
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


This is not the signature you are looking for
Re: small question [Re: foshizzle] #192637 06/01/08 05:02 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
In your example, what do you want to write? Where?

-genius_at_work

Re: small question [Re: foshizzle] #192638 06/01/08 05:03 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
write where and to what?

if %g == 5 { command }


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: small question [Re: foshizzle] #192639 06/01/08 05:03 PM
Joined: Feb 2006
Posts: 546
J
jaytea Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
$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
Re: small question [Re: genius_at_work] #192640 06/01/08 05:04 PM
Joined: Aug 2007
Posts: 334
foshizzle Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
i want to write a x number of zeros behind a 1 for the number of decimal places(its an identifier)


This is not the signature you are looking for
Re: small question [Re: foshizzle] #192644 06/01/08 05:47 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Use exponents, as in the example above.

Code:

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



-genius_at_work

Re: small question [Re: foshizzle] #192645 06/01/08 05:51 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
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

Re: small question [Re: OrionsBelt] #192657 06/01/08 09:10 PM
Joined: Aug 2007
Posts: 334
foshizzle Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
i know $str, just forgot it lol. does anyone know why its $str and not $rep or something lol


This is not the signature you are looking for
Re: small question [Re: foshizzle] #192658 06/01/08 09:13 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: small question [Re: Riamus2] #192661 06/01/08 09:19 PM
Joined: Aug 2007
Posts: 334
foshizzle Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
i knw it ment string but i dont know how that is better than $ran or something lol


This is not the signature you are looking for
Re: small question [Re: foshizzle] #192663 06/01/08 09:41 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
What is $ran?

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


This is not the signature you are looking for
Re: small question [Re: foshizzle] #192667 07/01/08 12:16 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Too late to change it, so just accept it as-is. Besides, I think other languages use similar.


Invision Support
#Invision on irc.irchighway.net