• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Globalevents

Akkz

New Member
Joined
Apr 22, 2012
Messages
172
Reaction score
0
When I start the server I get this annoying error, anyone who could say what the problem could be?

Code:
[Error - GlobalEvent Interface]
buffer:onThink
Description:
(luaDoItemSetAttribute) Item not found

[Error - GlobalEvent Interface]
In a timer event called from:
buffer:onThink
Description:
(luaGetThingFromPos) Tile not found

Kind regards,
Akkz

Problem finally SOLVED!
 
Last edited:
Thats exactly what I did but there is no :/ But when I change Worldmap then there is no error, so maybe it's in the map? :O
 
Last edited:
Thats exactly what I did but there is no :/ But when I change Worldmap then there is no error, so maybe it's in the map? :O

Well if u look closely it says "item, tiles" There are some items and tiles in ur map that couses those bugg's.
So what u can do is update ur items.xml + items.otb to ur currently version so u won't have those bug's or search for the items/tiles and remove it or u can just use a new map.

- - - Updated - - -

This might fix ur problem.
backup ur own items.xml + items.otb + randomization.xml
After u backup'd replace it with those files: http://speedy*****malware.localhost/5AmWq/items.rar

(NOTICE THIS WILL ONLY WORK FOR 8.6, This download only containts a full updated 8.6 items/tiles)
 
Well if u look closely it says "item, tiles" There are some items and tiles in ur map that couses those bugg's.
So what u can do is update ur items.xml + items.otb to ur currently version so u won't have those bug's or search for the items/tiles and remove it or u can just use a new map.

Yes I have always thought its something in the map, but it doesnt say the item id or anything like that
Is it hard to update my items.xml/otb? Im very new with theese things. Thank you very much Dylanaw!
 
Yes I have always thought its something in the map, but it doesnt say the item id or anything like that
Is it hard to update my items.xml/otb? Im very new with theese things. Thank you very much Dylanaw!

I updated my post, if ur using 8.6 version then do what i said, and if u don't use 8.6 version then find on the forum's for a updated items.xml/otb/randomization.xml
 
[Warning - Items::loadFromXml] Unknown key value walkStack
[Warning - Items::loadFromXml] Unknown type rune

- - - Updated - - -

[Error - GlobalEvent Interface]
buffer:onThink
Description:
(luaDoItemSetAttribute) Item not found

[Error - GlobalEvent Interface]
In a timer event called from:
buffer:onThink
Description:
(luaGetThingFromPos) Tile not found

Still not working...
 
[Warning - Items::loadFromXml] Unknown key value walkStack
[Warning - Items::loadFromXml] Unknown type rune

- - - Updated - - -

[Error - GlobalEvent Interface]
buffer:onThink
Description:
(luaDoItemSetAttribute) Item not found

[Error - GlobalEvent Interface]
In a timer event called from:
buffer:onThink
Description:
(luaGetThingFromPos) Tile not found

Still not working...

Hmm sorry i don't know that error.
I hope someone else can help u further.
 
Because you're not actually looking for "luaGetThingFromPos".
You're looking for getThingFromPos and doItemSetAttribute.
 
Because you're not actually looking for "luaGetThingFromPos".
You're looking for getThingFromPos and doItemSetAttribute.

ohh thanks!

LUA:
 function eventStart()
	doSetStorage(Event_Tile_Close,-1)
	setGlobalStorageValue(Event_timeend,1)
	setGlobalStorageValue(Timer, os.time() + Event_MaxTime*60)
	addEvent(eventEnd,Event_MaxTime*60*1000)
 
 
 
            for v = frompos.x , topos.x do
				for k = frompos.y , topos.y do
					for i = 1, 200 do
						position = {x = v, y = k, z = 7, stackpos = i}
						pid = getThingfromPos(position).uid
							if(pid ~= nil and isPlayer(pid)) then
								table.insert(players, pid)
							end 

 function onThink(interval)
   if getGlobalStorageValue(Event_Start) < 0 then
		setGlobalStorageValue(Event_Start,1)
		doSetStorage(Event_Tile_Close,1)
		players = {}
		if getTileItemById(Tp_Place, 1387).uid < 1 then
			doItemSetAttribute(doCreateItem(1387,1, Tp_Place), "aid", 3435)
		end
 
		f= Event_WaitTime - 1
			for i = 1,Event_WaitTime-1 do
				addEvent(doBroadcastMessage,i*60*1000,"")
				f= f-1
			end
		addEvent(eventStart,Event_WaitTime*60*1000)
	end
what should I change?
 
Last edited:
I've never really used a function inside a function often, but you can try this:

LUA:
function eventStart()
	doSetStorage(Event_Tile_Close,-1)
	setGlobalStorageValue(Event_timeend,1)
	setGlobalStorageValue(Timer, os.time() + Event_MaxTime*60)
	addEvent(eventEnd,Event_MaxTime*60*1000)
 
 
 
            for v = frompos.x , topos.x do
				for k = frompos.y , topos.y do
					for i = 1, 200 do
						position = {x = v, y = k, z = 7, stackpos = i}
						pid = getThingfromPos(position).uid
							if(pid ~= nil and isPlayer(pid)) then
								table.insert(players, pid)
							end 
 
 function onThink(interval)
   if getGlobalStorageValue(Event_Start) < 0 then
		setGlobalStorageValue(Event_Start,1)
		doSetStorage(Event_Tile_Close,1)
		players = {}
		if getTileItemById(Tp_Place, 1387).uid < 1 then
			doItemSetAttribute(doCreateItem(1387,1, Tp_Place).uid, "aid", 3435)
		end
 
		f= Event_WaitTime - 1
			for i = 1,Event_WaitTime-1 do
				addEvent(doBroadcastMessage,i*60*1000,"")
				f= f-1
			end
		addEvent(eventStart,Event_WaitTime*60*1000)
	end

Hopefully that solves one error
 
Back
Top