Версия кликера 4,13,007 -- скрипт никак не хочет единожды выполнять условие на строке 85 и многожды штампует в свой чат строку "First!", пытаясь сравнить число с числом.
// 31-Dec-2017 nd: arrDedup
#name "CMS-files' Varz"
logclear
logshow(1,1,1)
//#logfile "_MyVarz.txt"
$pathx="E:\port\PortableApps\~~clickermann_last\Clickermann4.13b3\projects\"
//if(strcut2($pathx,strlen($pathx-1),strlen($pathx))="\")
// print("1")
//else
// $pathx=strconcat($pathx,"\")
//end_if
//print($pathx)
//getfilelist($cmsz,"*.cms")
getfilelist($cmsz,strconcat($pathx,"*.cms"))
//for($i=0,$i<arrsize($cmsz))
// print($cmsz[$i])
//end_cyc
print("Totally: ",arrsize($cmsz)," scripts")
//for($j=0,$j<arrsize($cmsz))
for($j=0,$j<arrsize($cmsz))
print("Processing file # ",$j," of ",1+arrsize($cmsz),", ",$cmsz[$j])
waitms(700)
TFReadArr(strconcat($pathx,$cmsz[$j]),$linez)
define($vars,0)
for($k=0,$k<arrsize($linez))
$dollar=strpos($linez[$k],"$")
if($dollar=0)
else
//inc($vars)
$symz=strconcat(",=<> -+*/()!:\.",char(34)) // $[]
for($l=0,$l<strlen($symz))
$sym=strcut($symz,$l+1,1)
//print($sym)
$cutlim=strpos(strcut2($linez[$k],$dollar+1,strlen($linez[$k])),$sym)
if($cutlim>0)
//else
arrpush($min,$cutlim)
//print(" ",$cutlim)
end_if
end_cyc
//arrsort($min)
$minml=$min[0] ///////////////// Array sorting
for($m=0,$m<arrsize($min))
if($minml>$min[$m])
$minml=$min[$m]
end_if
end_cyc
//$linez[$k]=strcut2($linez[$k],$dollar,$min[0])
//print("Min= ",$min[0])
//print(" Min= ",$minml)
//print($dollar," ",$min[0])
//$myvar=strcut($linez[$k],$dollar,$min[0]-1)
$myvar=strcut($linez[$k],$dollar+1,$minml-1)
undefine($min)
//print(" ",strcut($linez[$k],$dollar,strlen($linez[$k])))
if(strlen($myvar)>1)
//print(" ",$myvar) ///////////////////////////////// Varz output
inc($vars)
arrpush($curvarz,$myvar)
end_if
end_if
end_cyc
undefine($linez)
/////// Array deduplication
print("CurrVarz= ",arrsize($curvarz))
for($n=0,$n<arrsize($curvarz))
$curr=arrpop($curvarz)
//$currunix=0
//////////////////////////////////////////////////////////////// err
// if(arrsize($uniqz)=0)
// $uniqz[0]=$curr
// print("First!")
// end_if
if(arrsize($uniqz)>0)
print("Not else!")
else
$uniqz[0]=$curr
print("First!")
end_if
for($o=0,$o<arrsize($uniqz))
if($curr = $uniqz[$o])
//print("1")
else
arrpush($uniqz,$curr)
//inc($currunix)
end_if
end_cyc
//print($currunix)
print("UniqVarz= ",arrsize($uniqz))
undefine($uniqz)
//$curvarz[$n]
end_cyc
//print("Unix= ",arrsize($uniqz))
end_cyc
print($vars," varz from ",arrsize($cmsz)," scripts")
halt