Re: need help ' onUseItem '
Posted: Sun Feb 03, 2013 7:02 pm
Need help again
Here, I have a function which must destroy a teleporter.
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
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