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

String.find attempt to index al boolean value?

Ecstacy

Mothafuckaaa
Joined
Dec 26, 2008
Messages
3,836
Reaction score
108
Location
The Netherlands
Hey,

I'm having an error with this part of my script, it tells me I attempt to index a boolean value :s

Distro: 0.3.6pl1
Error:
Code:
[09/03/2011 20:27:20] [Error - Action Interface] 
[09/03/2011 20:27:20] data/actions/scripts/petdeed.lua:onUse
[09/03/2011 20:27:20] Description: 
[09/03/2011 20:27:20] data/lib/050-function.lua:250: attempt to index a boolean value
[09/03/2011 20:27:20] stack traceback:
[09/03/2011 20:27:20]     data/lib/050-function.lua:250: in function 'getItemSpecialDescription'
[09/03/2011 20:27:20]     data/actions/scripts/petdeed.lua:26: in function <data/actions/scripts/petdeed.lua:19>

[09/03/2011 20:27:22] [Error - Action Interface] 
[09/03/2011 20:27:22] data/actions/scripts/petdeed.lua:onUse
[09/03/2011 20:27:22] Description: 
[09/03/2011 20:27:22] (luaGetThing) Thing not found

Script part:
LUA:
for i = 1,#m do
	if string.find(getItemSpecialDescription(itemEx.uid):lower(),m[i]:lower()) then
		a = i
	end
end
local monster = m[a]
 
LUA:
for i = 1,#m do
	if (getItemAttribute(itemEx.uid, 'description') or ''):lower():find(m[i]:lower()) then
		a = i
		break
	end
end
local monster = m[a]
 
Back
Top