local digit = %I.to_d(strsub(str,1,1)) strsub is Lua 4 as well... Looks like you should use CGI Lua with Lua 4 or find an update for Lua 5.
local digit = %I.to_d(strsub(str,1,1))
find an update for Lua 5.
Where? jilani