• 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 Errors in console

Eraghon

New Member
Joined
Mar 2, 2009
Messages
94
Reaction score
0
Location
Szczecin
Hi, i have got problem
Code:
[Error - CreatureScript Interface] 
data/creaturescripts/scripts/think.lua:onThink
Description: 
(luaGetCreatureStorage) Creature not found

[Error - CreatureScript Interface] 
data/creaturescripts/scripts/think.lua:onThink
Description: 
(luaGetTileInfo) Tile not found

[Error - CreatureScript Interface] 
data/creaturescripts/scripts/think.lua:onThink
Description: 
data/creaturescripts/scripts/think.lua:11: attempt to index a boolean value
stack traceback:
	data/creaturescripts/scripts/think.lua:11: in function <data/creaturescripts/scripts/think.lua:1>


creaturescripts/scripts/think.lua
Code:
function onThink(cid, interval)
	local position = getCreaturePosition(cid)
	
	local posx = getPlayerStorageValue(cid,53451)
	local posy = getPlayerStorageValue(cid,53452)
	local posz = getPlayerStorageValue(cid,53453)

	if not(getTileThingByPos(position)) then
	print("Missing ground.")
	else
	if getTileInfo(position).protection and isPlayerPzLocked(cid) then
	db.executeQuery("INSERT INTO `z_bugs` VALUES (NULL, "..getPlayerGUID(cid)..", "..(position.x)..", "..(position.y)..","..(position.z)..",0)")

	doTeleportThing(cid,{x=posx,y=posy,z=posz}, TRUE)
	doCreatureSay(cid,'There is Protection Zone and you`re PZ-LOCKED.',TALKTYPE_ORANGE_1)
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,'[Server] WARNING! You will get BAN if you continue attempting to Protection Zone with PZ-LOCK!')
	end
        end
end

Please help :(
 
Back
Top