• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Whats Wrong?

Tibia Rox

Member
Joined
Feb 4, 2009
Messages
1,181
Reaction score
9
Location
U.S.A
Im getting this message when I start my server:
Code:
19] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/effects.lua:9: unexpected symbol near '['
[10/08/2010 19:16:19] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)
[10/08/2010 19:16:19] data/globalevents/scripts/effects.lua:9: unexpected symbol near '['

Heres the script I have:
Code:
--[[ 
	Talking Tp/signs/tiles for TFS 0.3+
	by Maxi (Shawak)
]]--
 
	local text = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = 152,43,7}, text = {"Depot"}},
	[2] = {pos = 153,43,7}, text = {"Sanfar"}},
	[3] = {pos = 154,43,7}, text = {"Falighart"}},
	[4] = {pos = 155,43,7}, text = {"Thais"}},
	[5] = {pos = 156,43,7}, text = {"Blood Bay"}},
	[6] = {pos = 157,43,7}, text = {"Zaoan Island"}}
	}
 
	local effects = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {152,43,7}, effect = {18}},
	[2] = {pos = {153,43,7}, effect = {19}},
	[3] = {pos = {154,43,7}, effect = {21}},
	[4] = {pos = {155,43,7}, effect = {22}},
	[5] = {pos = {156,43,7}, effect = {23}},
	[6] = {pos = {157,43,7}, effect = {24}}
	}
 
function onThink(interval, lastExecution)
	for _, area in pairs(text) do
		doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
	end
	for _, area in pairs(effects) do
		doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
	end
	return TRUE
end

And heres Shawak's script:
Code:
--[[ 
	Talking Tp/signs/tiles for TFS 0.3+
	by Maxi (Shawak)
]]--
 
	local text = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {1095,1217,7}, text = {"text 1"}},
	[2] = {pos = {1096,1217,7}, text = {"text 2"}},
	[3] = {pos = {1097,1217,7}, text = {"text 3"}},
	[4] = {pos = {1098,1217,7}, text = {"text 4"}}
	}
 
	local effects = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {1095,1217,7}, effect = {18}},
	[2] = {pos = {1096,1217,7}, effect = {19}},
	[3] = {pos = {1097,1217,7}, effect = {21}},
	[4] = {pos = {1098,1217,7}, effect = {22}}
	}
 
function onThink(interval, lastExecution)
	for _, area in pairs(text) do
		doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
	end
	for _, area in pairs(effects) do
		doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
	end
	return TRUE
end

Whats wrong?
 
Lua:
--[[ 
	Talking Tp/signs/tiles for TFS 0.3+
	by Maxi (Shawak)
]]--
 
	local text = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {152,43,7}, text = {"Depot"}},
	[2] = {pos = {153,43,7}, text = {"Sanfar"}},
	[3] = {pos = {154,43,7}, text = {"Falighart"}},
	[4] = {pos = {155,43,7}, text = {"Thais"}},
	[5] = {pos = {156,43,7}, text = {"Blood Bay"}},
	[6] = {pos = {157,43,7}, text = {"Zaoan Island"}}
	}
 
	local effects = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {152,43,7}, effect = {18}},
	[2] = {pos = {153,43,7}, effect = {19}},
	[3] = {pos = {154,43,7}, effect = {21}},
	[4] = {pos = {155,43,7}, effect = {22}},
	[5] = {pos = {156,43,7}, effect = {23}},
	[6] = {pos = {157,43,7}, effect = {24}}
	}
 
function onThink(interval, lastExecution)
	for _, area in pairs(text) do
		doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
	end
	for _, area in pairs(effects) do
		doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
	end
	return TRUE
end
 
Back
Top