Probably u changed events\scripts\player.lua.So yea usually when you press look on your item it shows You see Knight Helmet (Arm:200...) and etc but for some reason it disappeared from my server and not sure why and what i did
TFS 1.2
No console is clean. Im not sure what i changed because it worked couple days ago and i haven't done anything in player.lua but i might be lying and i dont rememberProbably u changed events\scripts\player.lua.
Send the script to a take a look.
Have erros in console?
function Player:onLook(thing, position, distance)
local description = "You see " .. thing:getDescription(distance)
if thing:isPlayer() then
local pronoun, posess = thing:getSex() == PLAYERSEX_MALE and 'His' or 'Her'
if thing == self then
pronoun = 'Your'
end
-- Rank Name
local rankName = selectPlayerRankName(thing)
if rankName ~= nil then
description = description .. string.format(' %s rank is %s.', pronoun, rankName)
end
end
if self:getGroup():getAccess() then
if thing:isItem() then
description = string.format("%s\nItem ID: %d", description, thing:getId())
local actionId = thing:getActionId()
if actionId ~= 0 then
description = string.format("%s, Action ID: %d", description, actionId)
end
local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
if uniqueId > 0 and uniqueId < 65536 then
description = string.format("%s, Unique ID: %d", description, uniqueId)
end
local itemType = thing:getType()
local transformEquipId = itemType:getTransformEquipId()
local transformDeEquipId = itemType:getTransformDeEquipId()
if transformEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
elseif transformDeEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
end
local decayId = itemType:getDecayId()
if decayId ~= -1 then
description = string.format("%s\nDecays to: %d", description, decayId)
end
elseif thing:isCreature() then
local str = "%s\nHealth: %d / %d"
if thing:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
end
description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
end
local position = thing:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d",
description, position.x, position.y, position.z
)
if thing:isCreature() then
if thing:isPlayer() then
description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
end
end
end
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
Only happens with GOD? Or normal players too?No console is clean. Im not sure what i changed because it worked couple days ago and i haven't done anything in player.lua but i might be lying and i dont remember
Lua:function Player:onLook(thing, position, distance) local description = "You see " .. thing:getDescription(distance) if thing:isPlayer() then local pronoun, posess = thing:getSex() == PLAYERSEX_MALE and 'His' or 'Her' if thing == self then pronoun = 'Your' end -- Rank Name local rankName = selectPlayerRankName(thing) if rankName ~= nil then description = description .. string.format(' %s rank is %s.', pronoun, rankName) end end if self:getGroup():getAccess() then if thing:isItem() then description = string.format("%s\nItem ID: %d", description, thing:getId()) local actionId = thing:getActionId() if actionId ~= 0 then description = string.format("%s, Action ID: %d", description, actionId) end local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID) if uniqueId > 0 and uniqueId < 65536 then description = string.format("%s, Unique ID: %d", description, uniqueId) end local itemType = thing:getType() local transformEquipId = itemType:getTransformEquipId() local transformDeEquipId = itemType:getTransformDeEquipId() if transformEquipId ~= 0 then description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId) elseif transformDeEquipId ~= 0 then description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId) end local decayId = itemType:getDecayId() if decayId ~= -1 then description = string.format("%s\nDecays to: %d", description, decayId) end elseif thing:isCreature() then local str = "%s\nHealth: %d / %d" if thing:getMaxMana() > 0 then str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana()) end description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "." end local position = thing:getPosition() description = string.format( "%s\nPosition: %d, %d, %d", description, position.x, position.y, position.z ) if thing:isCreature() then if thing:isPlayer() then description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp())) end end end self:sendTextMessage(MESSAGE_INFO_DESCR, description) end
if self:getGroup():getAccess() then
, and print to console to check if the script enters here.Happens with admin and normal player tested with both, first i though it was problem with admin but then i tested with normal player it was sameOnly happens with GOD? Or normal players too?
it prints 2 and 1Add a line under line 16, inside the if statement:if self:getGroup():getAccess() then
, and print to console to check if the script enters here.
Also, add a line on top of script (right below onLook) and print to console to check if the function gets called at all.
If it enters the function but not the if statement, maybe you have the wrong group id (if not, you have to backtrace further into the getAccess function)
U changed something in sources Client or Server? sendTextMessage function maybe?Happens with admin and normal player tested with both, first i though it was problem with admin but then i tested with normal player it was same
it prints 2 and 1
View attachment 36829
function Player:onLook(thing, position, distance)
local description = "You see " .. thing:getDescription(distance)
if self:getGroup():getAccess() then
if thing:isItem() then
description = string.format("%s\nItem ID: %d", description, thing:getId())
local actionId = thing:getActionId()
if actionId ~= 0 then
description = string.format("%s, Action ID: %d", description, actionId)
end
local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
if uniqueId > 0 and uniqueId < 65536 then
description = string.format("%s, Unique ID: %d", description, uniqueId)
end
local itemType = thing:getType()
local transformEquipId = itemType:getTransformEquipId()
local transformDeEquipId = itemType:getTransformDeEquipId()
if transformEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId)
elseif transformDeEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId)
end
local decayId = itemType:getDecayId()
if decayId ~= -1 then
description = string.format("%s\nDecays to: %d", description, decayId)
end
elseif thing:isCreature() then
local str = "%s\nHealth: %d / %d"
if thing:isPlayer() and thing:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
end
description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
end
local position = thing:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d",
description, position.x, position.y, position.z
)
if thing:isCreature() then
if thing:isPlayer() then
description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
end
end
end
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
Same with defaultReplace your onLook with the default one, if it still doesn't execute you've either edited sources related to text messages or something client related.
Lua:function Player:onLook(thing, position, distance) local description = "You see " .. thing:getDescription(distance) if self:getGroup():getAccess() then if thing:isItem() then description = string.format("%s\nItem ID: %d", description, thing:getId()) local actionId = thing:getActionId() if actionId ~= 0 then description = string.format("%s, Action ID: %d", description, actionId) end local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID) if uniqueId > 0 and uniqueId < 65536 then description = string.format("%s, Unique ID: %d", description, uniqueId) end local itemType = thing:getType() local transformEquipId = itemType:getTransformEquipId() local transformDeEquipId = itemType:getTransformDeEquipId() if transformEquipId ~= 0 then description = string.format("%s\nTransforms to: %d (onEquip)", description, transformEquipId) elseif transformDeEquipId ~= 0 then description = string.format("%s\nTransforms to: %d (onDeEquip)", description, transformDeEquipId) end local decayId = itemType:getDecayId() if decayId ~= -1 then description = string.format("%s\nDecays to: %d", description, decayId) end elseif thing:isCreature() then local str = "%s\nHealth: %d / %d" if thing:isPlayer() and thing:getMaxMana() > 0 then str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana()) end description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "." end local position = thing:getPosition() description = string.format( "%s\nPosition: %d, %d, %d", description, position.x, position.y, position.z ) if thing:isCreature() then if thing:isPlayer() then description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp())) end end end self:sendTextMessage(MESSAGE_INFO_DESCR, description) end
I dont have commit historyCheck what you have changed in your commit history.
So whats the point for you too comment "we're not going to keep guessing" just dont waste my time and your time.We're not going to keep guessing for you, It's your server and you obviously did something that broke it. Trace your steps to see what could be causing the issue. Sort your files by date and see what you last changed between the last time it worked to the time it broke.
Its too late now to use it again whats the point too say that? Its like you have broken leg and dude would say 'next time be more careful' like whats the point of saying that? Jesus christ guys is it new way to free post?And start using git or any other version-control tool.