Posted 01 May 2017 - 05:54 PM
Hello so i'm trying to insert like name = "name here" into this table
soo far i been trying to do this
I want it too look like this
btw the path is correct it leads to the table
Thx
{
"yeee",
ypos = 2,
xpos = 2,
}
soo far i been trying to do this
function load(name)
local file = fs.open(name,"r")
local data = file.readAll()
file.close()
return textutils.unserialize(data)
end
function save(table,name)
local file = fs.open(name,"w")
file.write(textutils.serialize(table))
file.close()
end
tabl = load("root/system/Apps/Lau_Shell/Config.conf")
--root/system/configs/AppPos.conf
print(tabl)
print(tabl.ypos)
print(tabl.xpos)
lua_icon = paintutils.loadImage("root/system/Apps/Lau_Shell/lua_shell.icon")
paintutils.drawImage(lua_icon, tabl.ypos, tabl.xpos)
a = {name = hello)
tab = {tabl}
table.insert(tabl, a)
save(tabl, "root/system/Apps/Lau_Shell/Config.conf")
I want it too look like this
{
"yeee",
ypos = 2,
xpos = 2,
name = "name_here",
}
btw the path is correct it leads to the table
Thx
Edited on 01 May 2017 - 05:11 PM