Guten Morgen,
Ich habe eine kleine Funktion geschrieben.
Nun möchte ich die Files die ich erstellt habe, auslesen.
Meine Funktion:
Lua
local new = {};
local typs = {".txt",".lua",".xml"};
function new.File (client,cmd,filename,typ)
if filename and typ then
file = fileCreate(filename.."."..typ);
if file then
outputChatBox("File was created! ("..filename.."."..typ..")",client,255,255,255);
outputChatBox("Your variable was "..filename,client,255,255,255);
setElementData(file,"isFile",true);
end
else
outputChatBox("Syntax: /cf [Name] [Type]",client,255,255,255);
end
end
addCommandHandler("cf",new.File);
function getListofFiles (client,cmd)
--?
end
addCommandHandler("list",getListofFiles);
Alles anzeigen
Bedanke mich im Voraus.
M.f.G