Ficou muito bom e organizado
gostei principalmente da LoadAsTable
Abraços,
Colex
info
Grupo: Visconde
Registrado: 03/10/05
Posts: 301
Reputação: +8
Gênero: Masculino
Ficou muito bom e organizado
gostei principalmente da LoadAsTable
Abraços,
Colex
info
Grupo: Campones
Registrado: 01/09/06
Posts: 2
Reputação: 0
ond q eu coloco isso ?
desculpa perguntar isso .. =P
eh q eu tava tentando achar ond coloca ![]()
info
Grupo: Visconde
Registrado: 29/06/08
Posts: 354
Reputação: +10
Char no Tibia: Sir Aluxes

é VBScript?
Vou Ver.
info
Grupo: Visconde
Registrado: 10/06/06
Posts: 338
Reputação: +6
Char no Tibia: Setyte Berseker
Desenvolvi algumas funções para tratamento de arquivos fácilmente, não é como a do Colex, que por sinal, é mais completa, mas, já ajuda.
function File:Exists(filename) local file = io.open(filename, "r") if (file == nil) then return false else file:close() return true end end function File:Create(filename, content) if (content == nil) then return false end local file = io.open(filename, "w") if (file == nil) then return false end file:write(content) file:flush() file:close() return true end function File:Save(filename, content) if (content == nil) then return false end local file = io.open(filename, "w+b") if (file == nil) then return false end file:write(content) file:flush() file:close() return true end function File:Load(filename) local file = io.open(filename, "r") if (file == nil) then return nil end local load = file:read("*all") file:close() return (load) end function File:LoadAsTable(filename) local file = io.open(filename, "r") if (file == nil) then return nil end local load = {} while true do local line = file:read("*l") if (line == nil) then break end table.insert(load, line) end file:close() return load, table.getn(load) end function File:GetExtension(filename) local fileExt = nil for w in string.gfind(filename, "(%.%a*)") do fileExt = string.lower(string.sub(w, 2, 10)) end return fileExt end function File:GetName(filename) local rFileName = nil for w in string.gfind(filename,"(%w*%.%w*)") do rFileName = string.lower(string.sub(w, 1, string.find(w, "%.")-1)) end return rFileName endCreio que o nome das funções se auto-explicam, mas se tiverem dúvidas, é só postarem.