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

What does it stands for and some other problem [Edited]

Elaney

Member
Joined
Jan 1, 2009
Messages
1,561
Reaction score
12
Location
Sweden
What does cid stand for?

and what is the problem if i get this?

Lua Script Error: [Npc interface]

I know it's the npc but what ;P

Rep if helped

/Elaney
 
Last edited:
What does cid stand for?

and what is the problem if i get this?

Lua Script Error: [Npc interface]

I know it's the npc but what ;P

Rep if helped

/Elaney

cid is the player's unique id, every player has their own..

and we'd need more info for your npc error, like the script etc
 
[16/02/2009 19:23:14] Lua Script Error: [MoveEvents Interface]
[16/02/2009 19:23:14] data/movements/scripts/spawn on tile 3.lua:onStepIn

[16/02/2009 19:23:14] luaGetPlayerStorageValue(). Player not found


PHP:
function onStepIn(cid, item, pos)



	
	if item.uid == 1030 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Ferumbras", dl1pos)
				doCreatureSay(cid, "1 Ferumbras comming!", TALKTYPE_ORANGE_1)


	else if item.uid == 1031 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Orshabaal", dl1pos)
				doCreatureSay(cid, "1 Orshabaal Coming!", TALKTYPE_ORANGE_1)

	else if item.uid == 1032 and getPlayerStorageValue(cid,97250) == 1 then

				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Thul", dl1pos)
				doCreatureSay(cid, "1 Thul Comming!", TALKTYPE_ORANGE_1)

	else if item.uid == 1033 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("Morgaroth", dl1pos)
				doCreatureSay(cid, "1 Morgaroth Comming1", TALKTYPE_ORANGE_1)

	else if item.uid == 1034 and getPlayerStorageValue(cid,97250) == 1 then
				
				dl1pos = {x=811, y=625, z=7}
				doSummonCreature("The Demon Oak", dl1pos)
				doCreatureSay(cid, "1 Demon Oak Going To Own you now!", TALKTYPE_ORANGE_1)

	

	else doPlayerSendTextMessage(cid, 20, 'Only those who have finished the quest can use the power of those tiles!')
    end
end
end
end
end
end
 
Use this as a base:
Code:
function onStepIn(cid, item, position, fromPosition)
	if item.uid == 7516 and getPlayerStorageValue(cid,7500) == 13 then
		warlock1pos = {x=32215, y=31841, z=15}
		warlock2pos = {x=32216, y=31832, z=15}	
		doSummonCreature("Warlock", warlock1pos)
		doSummonCreature("Warlock", warlock2pos)
		setPlayerStorageValue(cid, 7500, 14)	
	else
		doPlayerSendCancel(cid,"Sorry not possible.")
	end
	return TRUE
end

REP++?
 
Use this as a base:
Code:
function onStepIn(cid, item, position, fromPosition)
	if item.uid == 7516 and getPlayerStorageValue(cid,7500) == 13 then
		warlock1pos = {x=32215, y=31841, z=15}
		warlock2pos = {x=32216, y=31832, z=15}	
		doSummonCreature("Warlock", warlock1pos)
		doSummonCreature("Warlock", warlock2pos)
		setPlayerStorageValue(cid, 7500, 14)	
	else
		doPlayerSendCancel(cid,"Sorry not possible.")
	end
	return TRUE
end

REP++?

No "REP++".

@Elaney;
You have to check first if the 'cid' on the tile is a player.
Code:
    if isPlayer(cid) == FALSE then
        return TRUE
    end
Add this under function onStepIn(bla bla bla) and it should not print those errors anymore.
 
Use this as a base:
Code:
function onStepIn(cid, item, position, fromPosition)
	if item.uid == 7516 and getPlayerStorageValue(cid,7500) == 13 then
		warlock1pos = {x=32215, y=31841, z=15}
		warlock2pos = {x=32216, y=31832, z=15}	
		doSummonCreature("Warlock", warlock1pos)
		doSummonCreature("Warlock", warlock2pos)
		setPlayerStorageValue(cid, 7500, 14)	
	else
		doPlayerSendCancel(cid,"Sorry not possible.")
	end
	return TRUE
end

REP++?

You are not checking if the 'cid' is a player, resulting in the same error when it is about to send cancel or get/set storage.
 
i get this error.

[18/02/2009 21:52:56] data/actions/scripts/tools/rope.lua:onUse

[18/02/2009 21:52:56] luaGetThingfromPos(). Tile not found

PHP:
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local groundTile = getThingfromPos(toPosition)
	if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
		doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
	elseif isInArray(holeId, itemEx.itemid) == TRUE then
		local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
		if hole.itemid > 0 then
			doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE)
		else
			doPlayerSendCancel(cid, "Sorry, not possible.")
		end
	else
		return FALSE
	end
	return TRUE
end
 
i get this error.

[18/02/2009 21:52:56] data/actions/scripts/tools/rope.lua:onUse

[18/02/2009 21:52:56] luaGetThingfromPos(). Tile not found

PHP:
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local groundTile = getThingfromPos(toPosition)
	if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
		doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
	elseif isInArray(holeId, itemEx.itemid) == TRUE then
		local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
		if hole.itemid > 0 then
			doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE)
		else
			doPlayerSendCancel(cid, "Sorry, not possible.")
		end
	else
		return FALSE
	end
	return TRUE
end

What server do you use?

/Limannen
 
i get this error.

[18/02/2009 21:52:56] data/actions/scripts/tools/rope.lua:onUse

[18/02/2009 21:52:56] luaGetThingfromPos(). Tile not found

PHP:
local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local groundTile = getThingfromPos(toPosition)
	if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then
		doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE)
	elseif isInArray(holeId, itemEx.itemid) == TRUE then
		local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
		if hole.itemid > 0 then
			doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE)
		else
			doPlayerSendCancel(cid, "Sorry, not possible.")
		end
	else
		return FALSE
	end
	return TRUE
end

well it's mainly problem of all version of tfs i think this happen when u use rope on black tile but i'm not sure ;xd
 
Back
Top