Forkz
Well-Known Member
- Joined
- Jun 29, 2020
- Messages
- 274
- Solutions
- 1
- Reaction score
- 57
Hi otlanders,
Source: GitHub - nekiro/TFS-1.5-Downgrades at 7.72 (https://github.com/nekiro/TFS-1.5-Downgrades/tree/7.72)
Script
Error
Source: GitHub - nekiro/TFS-1.5-Downgrades at 7.72 (https://github.com/nekiro/TFS-1.5-Downgrades/tree/7.72)
Script
Lua:
local effects = {
{position = Position(2534, 2536, 7), text = "Welcome!", effect = 10, say = false, color = math.random(1,255)}
}
function onThink(interval)
for i = 1, #effects do
local settings = effects[i]
if settings then
local spectators = Game.getSpectators(settings.position, false, true, 7, 7, 5, 5)
if #spectators > 0 then
if settings.text then
for i = 1, #spectators do
if settings.say then
spectators[i]:say(settings.text, TALKTYPE_MONSTER_SAY, false, spectators[i], settings.position)
else
Game.sendAnimatedText(settings.text, settings.position, settings.color)
end
end
end
if settings.effect then
settings.position:sendMagicEffect(settings.effect)
end
end
end
end
return true
end
Error
Code:
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/custom/text_effect.lua:onThink
data/globalevents/scripts/custom/text_effect.lua:16: attempt to call field 'sendAnimatedText' (a nil value)
stack traceback:
[C]: in function 'sendAnimatedText'
data/globalevents/scripts/custom/text_effect.lua:16: in function <data/globalevents/scripts/custom/text_effect.lua:5>
[Error - GlobalEvents::think] Failed to execute event: TextEffect