Shamus Posted July 26, 2018 Share Posted July 26, 2018 Can help me? Where my false? local g = gg.getFile() i = gg.prompt({'Select script file:'}, {last}, {'file'}) g = i[1] local out = last..".e.lua" local ipairs = ipairs local string_byte = string.byte local string_format = string.format local table_concat = table.concat local g, varname = ... if f == nil then else local f = io.open(g, "r") assert(f); end d = [==["unsigned char "..varname.."[] = ( local len = 0 local fline = f:read(16) while fline do local fline_len = #fline len = len + fline_len local t = { string_byte(fline, 1, fline_len) } for k, v in ipairs(t) do t[k] = string_format("0x%02x", v) end fline = f:read(16) if fline then if x(" "..table_concat(t, ", ")..",") and x(" "..table_concat(t, ", ").."")>5 then end end end );" string_format("unsigned int %s_len = %d;", varname, len) ]==] f = io.open(out,'w')f:write(d) f:close() Link to comment Share on other sites More sharing options...
XxNihinivixX Posted May 11, 2019 Share Posted May 11, 2019 Because you just copy pasted probably and in local g = gg.getfile() U gave last as locale in gg.prompt make it g thats your locale Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.