I might be able to help, but I suggest posting such a question in ThePowderToy/LuaScripting forum next time. You might just be using the dofile command wrong. If your script is called Script1.lua then you would run it with dofile ("Script1.lua") If your file were called Pizza.lua then you would run it the same way. dofile ("Pizza.lua") Maybe this isn't the real problem. If I could see the code you used to run it, and the code in the first few lines of your script, then I might be able to determine the problem.
It's part of large script. Maybe i need delete "Grafito"?
---------------------------------GRAFITO---------------------------------------
local graphite = elem.allocate("KEV", "Grph")
elem.element(graphite, elem.element(elem.DEFAULT_PT_IRON))
elem.property(graphite, "Name", "GRPH")
elem.property(graphite, "Description", "Graphite. Absorbs neutrons and photons.")
elem.property(graphite, "Color", 0x1E1B1B)
elem.property(graphite, "Flammable", 5)
elem.property(graphite, "Properties", elem.TYPE_PART)
elem.property(graphite, "Weight", 20)
elem.property(graphite, "Meltable",1)
local function grafUpdate(i, x, y, s, nt)
r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
if r~= nil then
if sim.partProperty(r, "type") == elem.DEFAULT_PT_OXYG then
sim.partChangeType(r, elem.DEFAULT_PT_CO2)
sim.partKill(i)
end
if sim.partProperty(r, "type") == elem.DEFAULT_PT_FIRE then
sim.partProperty(r, "type", carbono)
sim.partKill(i)
end
if sim.partProperty(r, "type") == elem.DEFAULT_PT_OXYG then
sim.partProperty(r, "type", carbono)
sim.partProperty(i, "type", elem.DEFAULT_PT_CO2)
end
if sim.partProperty(r, "type") == elem.DEFAULT_PT_PROT then
sim.partProperty(r, "type", C14)
sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
end
if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
sim.partKill(r)
end
if sim.partProperty(r, "type") == elem.DEFAULT_PT_PHOT then
sim.partKill(r)
end
end
end
elem.property(graphite, "Update", grafUpdate)
Wherever you use something like sim.partProperty(r, "type", carbono), instead of putting just the element's name, you need to have its identifier. This can be something like elem.KEV_PT_GRPH or something like tpt.element('grph').
Also, a quick note, when using TPT's default elements, like elem.DEFAULT_PT_PHOT, it goes way faster using the element's number instead. For example, you could use 18 instead of elem.DEFAULT_PT_NEUT. This helps the element's lag. You can find any element's number by typing it in the format I already mentioned (elem.IDENTIFIER_PT_ELEMENT or tpt.elem('element') ) in the game's console.
<img style="width:100%" src='https://s8.hostingkartinok.com/uploads/images/2021/01/
There is no one "%" symnol in script...