Code:
local nameitem= player:getItemById(item_id , true)
local resultId = db.storeQuery('SELECT `itemname` FROM `teste_list` WHERE `id` = ' .. player:getAccountId() .. '')
local item_id = result.getNumber(resultId, 'itemname')
print(itemname)
print(nameitem)
well I'm trying to pull the id of an item and use it in a script
more when i put it inside the player: getItemById it pulls a null value
more when I pull out of function it pulls the correct id that is inside the database
Last edited: