table.insert(a,k:gsub("123","")) text="sdf圣达菲s | 2" asdf 2 bad argument #2 to 'table' (number expected, got string) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 原因在于,lua的table.insert 本来接收3个参数, table,pos,content 其中,pos可以省略,默认追加到table结尾 而我们gsub时...
awk with the gsub() function like ‘gsub(/\r/,””)’ perl with an -e one-liner like ‘s/\r//’ dos2unix for simple <CR><LF> to <LF> conversion In addition, we can avoid the shebang issues if we run a script as an argument of its interpreter instead of directly. This fact...
[00:00:46]: [string "scripts/json.lua"]:475: bad argument #1 to 'gsub' (string expected, got boolean) LUA ERROR stack traceback: =[C]:-1 in (field) gsub (C) <-1--1> scripts/json.lua:475 in (upvalue) encodeString (Lua) <474-48...