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

Solved Error lua

Stempel2

New Member
Joined
Aug 11, 2013
Messages
35
Reaction score
1
i got problem with lua script :/

[19/8/2013 17:25:51] >>> Loading globalscripts... [Error - LuaInterface::loadFile] data/globalevents/scripts/effect.lua:3: unexpected symbol near '['
[19/8/2013 17:25:52] [Error - Event::checkScript] Cannot load script (data/globalevents/scripts/effect.lua)
[19/8/2013 17:25:52] data/globalevents/scripts/effect.lua:3: unexpected symbol near '['

anyone tell me whats wrong here??

Code:
local config = {
                ["Point Shop"] = {x=259,y=259,z=7}, eff = CONST_ME_POFF},
 		    	["Depo"] = {x=253,y=257,z=7}, eff = CONST_ME_POFF},
				["Exp"] = {x=259,y=257,z=7}, eff = CONST_ME_POFF},
				["Training"] = {x=253,y=259,z=7}, eff = CONST_ME_POFF},
				["Temple"] = {x=283,y=256,z=7}, eff = CONST_ME_POFF},
				["Training"] = {x=283,y=258,z=7}, eff = CONST_ME_POFF}}
			 
			function onThink(cid, interval, lastExecution)
			for k, v in pairs(config) do
			doSendMagicEffect(v.pos, v.eff)
			return doSendAnimatedText(v.pos, k, math.random(1, 255))
			end
			return true
			end
 
Last edited:
Lua:
 local config = {
                ["Point Shop"] = {x=259,y=259,z=7}, eff = CONST_ME_POFF},
 		    	["Depo"] = {x=253,y=257,z=7}, eff = CONST_ME_POFF},
				["Exp"] = {x=259,y=257,z=7}, eff = CONST_ME_POFF},
				["Training"] = {x=253,y=259,z=7}, eff = CONST_ME_POFF},
				["Temple"] = {x=283,y=256,z=7}, eff = CONST_ME_POFF},
				["Training"] = {x=283,y=258,z=7}, eff = CONST_ME_POFF}
			 
			function onThink(cid, interval, lastExecution)
			for k, v in pairs(config) do
			doSendMagicEffect(v.pos, v.eff)
			return doSendAnimatedText(v.pos, k, math.random(1, 255))
			end
			return true
			end
 
still same

[19/8/2013 17:46:54] >>> Loading globalscripts... [Error - LuaInterface::loadFile] data/globalevents/scripts/effect.lua:3: unexpected symbol near '['
[19/8/2013 17:46:54] [Error - Event::checkScript] Cannot load script (data/globalevents/scripts/effect.lua)
[19/8/2013 17:46:54] data/globalevents/scripts/effect.lua:3: unexpected symbol near '['
 
yes but i dont see anything wrong in left brackets '[' , only in the right brackets but its correct all there and why script is not working
 
Lua:
local config = {
            ["Point Shop"] = { x = 259, y = 259, z = 7 },
			 
			function onThink(cid, interval, lastExecution)
			for k, v in pairs(config) do
			doSendMagicEffect(v.pos, v.eff)
			return doSendAnimatedText(v.pos, k, math.random(1, 255))
			end
			return true
			end
 
Lua:
local config = {
            ["Point Shop"] = { x = 259, y = 269, z = 7 },
			 
			function onThink(cid, interval, lastExecution)
			for k, v in pairs(config) do
			doSendMagicEffect(v.pos, v.eff)
			return doSendAnimatedText(v.pos, k, math.random(1, 255))
			end
			return true
			end

What are you doing?
 
Lua:
local config = {
            ["Point Shop"] = { x = 259, y = 259, z = 7 },
			 
			function onThink(cid, interval, lastExecution)
			for k, v in pairs(config) do
			doSendMagicEffect(v.pos, v.eff)
			return doSendAnimatedText(v.pos, k, math.random(1, 255))
			end
			return true
			end


[19/8/2013 17:56:14] >>> Loading globalscripts... [Error - LuaInterface::loadFile] data/globalevents/scripts/effect.lua:4: '(' expected near 'onThink'
[19/8/2013 17:56:14] [Error - Event::checkScript] Cannot load script (data/globalevents/scripts/effect.lua)
[19/8/2013 17:56:14] data/globalevents/scripts/effect.lua:4: '(' expected near 'onThink'
[19/8/2013 17:56:14] (done).
 
try this
Lua:
 local config = {
            ["Point Shop"] = { x = 259, y = 259, z = 7 },
 
			function onThink (cid, interval, lastExecution)
			for k, v in pairs(config) do
			doSendMagicEffect(v.pos, v.eff)
			return doSendAnimatedText(v.pos, k, math.random(1, 255))
			end
			return true
			end
 
try this
Lua:
 local config = {
            ["Point Shop"] = { x = 259, y = 259, z = 7 },
 
			function onThink (cid, interval, lastExecution)
			for k, v in pairs(config) do
			doSendMagicEffect(v.pos, v.eff)
			return doSendAnimatedText(v.pos, k, math.random(1, 255))
			end
			return true
			end

Keep trying still wrong
 
Lua:
local config = {
    	["Point Shop"] = {pos = {x=259,y=259,z=7}, eff = CONST_ME_POFF},
 	["Depo"] = {pos = {x=253,y=257,z=7}, eff = CONST_ME_POFF},
	["Exp"] = {pos = {x=259,y=257,z=7}, eff = CONST_ME_POFF},
	["Training"] = {pos = {x=253,y=259,z=7}, eff = CONST_ME_POFF},
	["Temple"] = {pos = {x=283,y=256,z=7}, eff = CONST_ME_POFF},
	["Training"] = {pos = {x=283,y=258,z=7}, eff = CONST_ME_POFF}
}
			 
function onThink(cid, interval, lastExecution)
	for k, v in pairs(config) do
		doSendMagicEffect(v.pos, v.eff)
		doSendAnimatedText(v.pos, k, math.random(1, 255))
	end
	return true
end
 
Back
Top