function elementmod()
elemtype=tpt.input("Element to edit","This is the element the script will modify")
scriptname = tpt.input("Script Name","This will be the name of the generated script")
file = io.open(scriptname, "w")
file:write("tpt.el.",elemtype,"name=",tpt.input("New name","This will be the new name of the element"))
file:write("tpt.el.",elemtype,"description=",tpt.input("New description","This will be the new description of the element"),"\n")
file:write("tpt.el.",elemtype,"color=",tpt.input("New color","This will be the new color of the element"),"\n")
file:write("tpt.el.",elemtype,"menusection=",tpt.input("New menusection","This will be the new menusection of the element"),"\n")
file:write("tpt.el.",elemtype,"gravity=",tpt.input("New gravity","This will be the new gravity of the element"),"\n")
file:write("tpt.el.",elemtype,"flammable=",tpt.input("New flammability","This will be the new flammability of the element"),"\n")
file:write("tpt.el.",elemtype,"explosive=",tpt.input("New explosivity","This will be the new explosivity of the element"),"\n")
file:write("tpt.el.",elemtype,"loss=",tpt.input("New loss","This will be the new loss of the element"),"\n")
file:write("tpt.el.",elemtype,"airloss=",tpt.input("New airloss","This will be the new airloss of the element"),"\n")
file:write("tpt.el.",elemtype,"airdrag=",tpt.input("New airdrag","This will be the new airdrag of the element"),"\n")
file:write("tpt.el.",elemtype,"advection=",tpt.input("New advection","This will be the new advection of the element")," \n")
file:write("tpt.el.",elemtype,"weight=",tpt.input("New weight","This will be the new weight of the element"),"\n")
file:write("tpt.el.",elemtype,"diffusion=",tpt.input("New diffusion","This will be the new diffusion of the element"),"\n")
file:write("tpt.el.",elemtype,"heat=",tpt.input("New heat","This will be the new creation temperature of the element"),"\n")
end
Why won't that write anything in the file? It creates an empty file, but it also leaves it empty.
ohh...
--Actually, I tried both, that made it not even create the file.
Lol, somehow I'm not surprised that no one is suggesting anything. If Cracker can't flawlessly fix a script first try, it will never work.