Sigoles
Discord: @sigoles
- Joined
- Nov 20, 2015
- Messages
- 1,209
- Solutions
- 2
- Reaction score
- 154
Someone can help me? I'm using tfs 1.2 and tried to update looking this commit:
Move !sellhouse to talkactions · otland/forgottenserver@1c227d3 · GitHub
but I have an error when try to sell house:
Move !sellhouse to talkactions · otland/forgottenserver@1c227d3 · GitHub
LUA:
function onSay(player, words, param)
local tradePartner = Player(param)
if not tradePartner or tradePartner == player then
player:sendCancelMessage("Trade player not found.")
return false
end
local house = player:getTile():getHouse()
if not house then
player:sendCancelMessage("You must stand in your house to initiate the trade.")
return false
end
local returnValue = house:startTrade(player, tradePartner)
if returnValue ~= RETURNVALUE_NOERROR then
player:sendCancelMessage(returnValue)
end
return false
end
but I have an error when try to sell house:
Code:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/sellhouse.lua:onSay
data/talkactions/scripts/sellhouse.lua:14: attempt to call method 'startTrade' (a nil value)
stack traceback:
[C]: in function 'startTrade'
data/talkactions/scripts/sellhouse.lua:14: in function <data/talkactions/scripts/sellhouse.lua:4>