• 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!

Lua Globalevents LMS

4Muki4

HOROHOROHORO
Joined
May 1, 2012
Messages
757
Reaction score
70
My problem is now in console check this

Code:
[04/06/2012 11:27:56] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/miu.lua:34: 'end' expected (to close 'function' at line 15) near '<eof>'
[04/06/2012 11:27:56] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/miu.lua)
[04/06/2012 11:27:56] data/globalevents/scripts/miu.lua:34: 'end' expected (to close 'function' at line 15) near '<eof>'


My script is:
Lua:
local config = {
	temporaryArea = {
		{x = 1108, y = 715, z = 7}, -- northwest corner of area where players must stand in order to join the event
		{x = 1108, y = 717, z = 7} -- south east corner
	},
	arenaArea = {
		{x = 1114, y = 710, z = 7}, -- nw corner of arena
		{x = 1114, y = 720, z = 7}, -- se corner of arena
		{x = 1120, y = 715, z = 7} -- center of arena
	},
	minPlayers = 2, -- min players required to start the battle
	prize = {2160, 5467} -- rewards
}
 
function onThink(interval, lastExecution, thinkInterval)
	local players, arenaPlayers = {}, {}
	for x = (config.temporaryArea)[1].x, (config.temporaryArea)[2].x do
		for y = (config.temporaryArea)[1].y, (config.temporaryArea)[2].y do
			for z = (config.temporaryArea)[1].z, (config.temporaryArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(players, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
	for x = (config.arenaArea)[1].x, (config.arenaArea)[2].x do
		for y = (config.arenaArea)[1].y, (config.arenaArea)[2].y do
			for z = (config.arenaArea)[1].z, (config.arenaArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(arenaPlayers, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
Im using TFS 0.3.6 8.60

Rep++ for help
 
Last edited:
Lua:
local config = {
	temporaryArea = {
		{x = 1108, y = 715, z = 7}, -- northwest corner of area where players must stand in order to join the event
		{x = 1108, y = 717, z = 7} -- south east corner
	},
	arenaArea = {
		{x = 1114, y = 710, z = 7}, -- nw corner of arena
		{x = 1114, y = 720, z = 7}, -- se corner of arena
		{x = 1120, y = 715, z = 7} -- center of arena
	},
	minPlayers = 2, -- min players required to start the battle
	prize = {2160, 5467} -- rewards
}
 
function onThink(interval, lastExecution, thinkInterval)
	local players, arenaPlayers = {}, {}
	for x = (config.temporaryArea)[1].x, (config.temporaryArea)[2].x do
		for y = (config.temporaryArea)[1].y, (config.temporaryArea)[2].y do
			for z = (config.temporaryArea)[1].z, (config.temporaryArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(players, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
	for x = (config.arenaArea)[1].x, (config.arenaArea)[2].x do
		for y = (config.arenaArea)[1].y, (config.arenaArea)[2].y do
			for z = (config.arenaArea)[1].z, (config.arenaArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(arenaPlayers, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
end

???.
 
Lua:
local config = {
	temporaryArea = {
		{x = 1108, y = 715, z = 7}, -- northwest corner of area where players must stand in order to join the event
		{x = 1108, y = 717, z = 7} -- south east corner
	},
	arenaArea = {
		{x = 1114, y = 710, z = 7}, -- nw corner of arena
		{x = 1114, y = 720, z = 7}, -- se corner of arena
		{x = 1120, y = 715, z = 7} -- center of arena
	},
	minPlayers = 2, -- min players required to start the battle
	prize = {2160, 5467} -- rewards
}
 
function onThink(interval, lastExecution, thinkInterval)
	local players, arenaPlayers = {}, {}
	for x = (config.temporaryArea)[1].x, (config.temporaryArea)[2].x do
		for y = (config.temporaryArea)[1].y, (config.temporaryArea)[2].y do
			for z = (config.temporaryArea)[1].z, (config.temporaryArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(players, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
	for x = (config.arenaArea)[1].x, (config.arenaArea)[2].x do
		for y = (config.arenaArea)[1].y, (config.arenaArea)[2].y do
			for z = (config.arenaArea)[1].z, (config.arenaArea)[2].z do
				if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
					table.insert(arenaPlayers, getTopCreature({x = x, y = y, z = z}).uid)
				end
			end
		end
	end
end

???.

What you mean right now thats teckmans lms script
 
OMG IM IDIOT rep to vankk

Edit:

NEW PROBLEM
[04/06/2012 11:48:26] [Error - GlobalEvents::think] Couldn't execute event: arena
[04/06/2012 11:48:37] [Error - GlobalEvents::think] Couldn't execute event: arena
[04/06/2012 11:48:48] [Error - GlobalEvents::think] Couldn't execute event: arena
[04/06/2012 11:48:59] [Error - GlobalEvents::think] Couldn't execute event: arena
[04/06/2012 11:49:10] [Error - GlobalEvents::think] Couldn't execute event: arena
[04/06/2012 11:49:21] [Error - GlobalEvents::think] Couldn't execute event: arena
[04/06/2012 11:49:32] [Error - GlobalEvents::think] Couldn't execute event: arena
 
Last edited:
Back
Top