Change this line:
set -l $+(%,ListK.,%index) %nick %CurrentVal
by this line:
set -l $+(%,ListK.,%index) %nick $+ $chr(44) $+ %CurrentVal
And this line:
echo # $sorttok($var(%ListK.*,%x).value,32)
by this line:
echo # $sorttok($var(%ListK.*,%x).value,44)