I got this code:
alias testar {
var %d = $qt($mircdirsystem\images\backgrounds\),%x = $findfile(%d,*.jpg,1,0)
echo -s X1: %x
while ($findfile(%d,*.jpg,%x,0)) {
echo -s X2: %x $v1
if (bla* !iswm $nopath($v1)) { echo -s V: $v2 | var %nb = %nb $v2 }
else { var %b = %b $regsubex($v2,/^bla/,) }
dec %x
}
var %x = 0
while (%x < $right(%b,1)) {
inc %x
if (%x !isin %b) { var %c = %c %x }
}
while (%nb) {
if (%b = $regsubex(%b,/\d/g,\n)) {
var %nn = $calc($right(%b,1)+1)
}
else {
var %nn = $gettok(%c,1,32)
var %c = $remtok(%c,%nn,1,32)
}
var %onb = $gettok(%nb,1,32)
var %nb = $remtok(%nb,%onb,1,32)
rename $+(%d,%onb) $+(%d,bla,%nn,.jpg)
}
}
And now to the problem, when i trigger the script i see this in my status window (the echo -s X1: %x and echo -s X1: %x)
X1: C:\mIRC\system\images\backgrounds\bla1.jpg
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
as you see it echo the same image all the time, after like 200 echo's i get this error "* /set: line too long (line 50, script1.mrc)", now i add one more echo to the code:
I adding this: echo -s %nb
X1: C:\mIRC\system\images\backgrounds\bla1.jpg
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5 5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5 5 5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5 5 5 5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5 5 5 5 5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
look at the row with only 5's in it, it will be filled up. it starting with one 5 then it adding more and more untill it halts with the same error as befor, the last lines looks like:
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
X2: C:\mIRC\system\images\backgrounds\bla1.jpg 5
V: 5
-
* /set: line too long (line 50, script1.mrc)
And I havent been able to solve it, I got this code from a person on irc, i dont understand how it works, so im not able to fix the problem..
line 50 = if (bla* !iswm $nopath($v1)) { echo -s V: $v2 | var %nb = %nb $v2 }