it's not wrong, but what's the meaning of cl_limit? normally, the chanlimit, if being enforced automatically, needs to be the number of total channel users (ops & voices included) + some slack constant (usually in the 5-10 range), so calculating ops & voices for that purpose dosn't really make much sense
if you are pretty new to eggdrop and Tcl, I'd suggest you stick with popular scripts by respected authors for now, without trying to patch these (they've been known to be working pretty well for quite some time now)
The reason is because I have set the bot to auto-notice everyone who joins to type /msg botnick voiceme. When a non-clone sees that he will type it and get autovoice. Then my bot will check every minute to see if the limit needs to be increased.
Oh and cl_limit is actually that slack variable. Which is your somevar. Now if only I can figure out how to change that in irc.