on *:input:#:{
if (/* !iswm $1-) { var %i = 1,%str = d det r er | while ($gettok(%str,%i,32)) { while ($istok($1-,$gettok(%str,%i,32),32)) { tokenize 32 $reptok($1-,$gettok(%str,%i,32),$gettok(%str,$calc(%i + 1),32),1,32) } | inc %i 2
} | say $1- | halt } }
If you try to put all that in 1 line, it wont work.. No errors or anything, but it just dont do the reptok..
why would you want it all on one line?
it looks horrible
hehe, thats not the point :P
I was gonna post it in a channel, so i wanted it all in one line, but I noticed that the $reptok didnt work when I did
Maybe it is related to this thread...
Works just fine here
I type in a channel d.. And it was replaced with det..
Also i type r.. And it was replaced with er..
So.. Script works fine.. But it is not very readable..
How about somethink like that ?
on *:input:#:{
if (/* !iswm $1-) {
var %i = 1
%str = d det r er
while ($gettok(%str,%i,32)) {
while ($istok($1-,$gettok(%str,%i,32),32)) {
tokenize 32 $reptok($1-,$gettok(%str,%i,32),$gettok(%str,$calc(%i + 1),32),1,32)
}
inc %i 2
}
say $1-
halt
}
}
i did some testing and found out that mIRC skips the first while loop when the 2'nd is done.. i just dont think mIRC likes double while loops in one line... :tongue:
Err.. Yap.. That not work in 1 line.. But if i copy&paste exact the script in first post(in 3 lines).. It work fine..
Ok.. Here is a more good version to demonstrate the bug.. (zzz sorry for english ;P)
on *:input:#:{ var %i = 1 | var %y = 1 | while (%i <= 100) { echo bheee | while (%y <= 100 ) { echo muuu | inc %y } | inc %i } | echo Cows Win ! }
That script(put all in one line) demonstrate what you say.. It will echo 100 times muuu and only one bheee
I was gonna post it in a channel, so i wanted it all in one line
<offtopic>
i'd like to introduce you to nomorepasting.com
</offtopic>
mIRC hasn't handled more that one while loop on a single line for at least several versions.