
Code: Select all
function chaos_wall_destroy()
local nameteleporter = "tele"..counter_chaos:getValue()
print ("dest "..nametele)
nameteleporter:destroy()
end
The teleporter was created before by script. The id of this teleporter is "tele"..counter_chaos:getValue()
I increment a counter each time a teleporter is created to have a different name.
The names of the teleporters are tele1, tele2, tele3 ... ...
(no problem with that)
But when I want to destroy it using the name I make dynamicly, it don't works
