the first condition can be like this i think!!
if (%char isnum 33-122) var %str $+(%str,$chr($v1))
why u set var %str and u reset it down i think the first one is useless