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

Lookondescription player/npc shows doubled

wafuboe

Member
Joined
Dec 24, 2010
Messages
881
Solutions
2
Reaction score
22
Well i just fixed a bug that was making onlook on items look double, i solved it.
But now i still have the problem with npcs and players description on look looks doubled
35096

im using tfs 1.3
here is my player.lua


THANKS IN ADVANCE!
 
You are calling getDescription 3 times in onLook when it only needs to be called once.
This is the only time it needs to be called.
Lua:
local description = "You see " .. thing:getDescription(distance)
 
are these the wrong ones?

Code:
function Player:onLookInTrade(partner, item, distance)
   local description = item:getDescription(distance)
   description = stat_onLook(item, description)
   self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. description)
end

Code:
description = stat_onLook(thing, description)

Code:
  description = description .. thing:getDescription(distance)

should i just delete them?
 
are these the wrong ones?

Code:
function Player:onLookInTrade(partner, item, distance)
   local description = item:getDescription(distance)
   description = stat_onLook(item, description)
   self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. description)
end

Code:
description = stat_onLook(thing, description)

Code:
  description = description .. thing:getDescription(distance)

should i just delete them?
Your server will not detonate if you make an attempt to change it; its not a bomb. If you are scared that if you remove something from it that it will never work again then make a backup 1st.
 
Back
Top