Fortera Global
Intermediate OT User
- Joined
- Nov 20, 2015
- Messages
- 1,180
- Solutions
- 2
- Reaction score
- 117
I'm tried to make an script to send effect on player but got error, help?:
Error:
tfs 1.2
Lua:
function onThink(interval, lastExecution)
local spec = getSpectators({x = 30685, y = 30485, z = 9}, 7, 7)
if spec ~= nil then
for _, s in pairs(spec) do
if isPlayer(s) then
s:getPosition():sendMagicEffect(8)
end
end
end
return true
end
Error:
Code:
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/others/Effets.lua:onThink
data/globalevents/scripts/others/Effets.lua:7: attempt to index local 's' (a number value)
stack traceback:
[C]: in function '__index'
data/globalevents/scripts/others/Effets.lua:7: in function <data/globalevents/scripts/others/Effets.lua:1>
[Error - GlobalEvents::think] Failed to execute event: EfetAcid
tfs 1.2