• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua onWrapItem - Events/player

Mariuskens

Sword Art Online 2D-MMORPG
Joined
Nov 21, 2008
Messages
1,009
Reaction score
119
Location
Spain
GitHub
Olimpotibia
Code:
Lua Script Error: [Event Interface]
data/events/scripts/player.lua:Player@onWrapItem
data/events/scripts/player.lua:392: attempt to call method 'getWrapId' (a nil value)
stack traceback:
        [C]: in function 'getWrapId'
        data/events/scripts/player.lua:392: in function <data/events/scripts/player.lua:383>

on this lines:

Code:
function Player:onWrapItem(item)
local pos = item:getPosition()
local house = Tile(pos):getHouse()

if house then
return true
end

self:sendTextMessage(MESSAGE_STATUS_SMALL, "You can only wrap and unwrap this item inside a
house.")
return false
end

What can i do to solve it? thnx
 
I have a feeling this snippit of code does not contain the piece that is causing the error. Nowhere does it call getWrapId.
 

Similar threads

Back
Top