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

doItemSetAttribute

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
[30/01/2010 11:54:42] [Error - TalkAction Interface]
[30/01/2010 11:54:42] buffer:eek:nSay
[30/01/2010 11:54:42] Description:
[30/01/2010 11:54:42] (luaDoItemSetAttribute) Item not found
Please fix:
Code:
local set2 = doPlayerAddItem(cid, 7844)
local set1 = doItemSetAttribute(set2, "actionid", 10901)
doItemSetAttribute(set1, "description", "LOL")
:thumbup:
 
local set2 = doPlayerAddItem(cid, 7844)
local set1 = doItemSetAttribute(set2, "actionid", 10901)
doItemSetAttribute(set2, "description", "LOL")

maybe this way?
 
local set2 = doPlayerAddItem(cid, 7844)
local set1 = doItemSetAttribute(set2, "actionid", 10901)
doItemSetAttribute(set1, "description", "LOL")

Lua:
config = { 
          itemId = 7844,
          actionId = 10901
         }
doPlayerAddItem(cid, doSetItemAttribute(config.itemId, "actionid", config.actionId, "description", "LOL")

won't this work?
I never tried to set different setItemAttributes in one line.

Otherwise do it like Fare says
 
Last edited:
local set2 = doPlayerAddItem(cid, 7844)
local set1 = doItemSetAttribute(set2, "actionid", 10901)
doItemSetAttribute(set1, "description", "LOL")

Lua:
config = { 
          itemId = 7844,
          actionId = 10901
         }
doPlayerAddItem(cid, doSetItemAttribute(config.itemId, "actionid", config.actionId, "description", "LOL")

won't this work?
I never tried to set different setItemAttributes in one line.

Otherwise do it like Fare says

Won't work, and:

local set2 = doPlayerAddItem(cid, 7844)
local set1 = doItemSetAttribute(set2, "actionid", 10901)
doItemSetAttribute(set2, "description", "LOL")

maybe this way?

Won't work...
 
Code:
local item = doPlayerAddItem(cid, 7844)
doItemSetAttribute(item, "actionid", 10901)
doItemSetAttribute(item, "description", "LOL")
 
still the same error? if not then try to use "aid" instead of "actionid"
or say your rev, need to check if doPlayerAddItem still returns items.uid
 
Code:
local thing = doPlayerAddItem(cid, 7844)
doItemSetAttribute(thing, "aid", 10901)
doItemSetAttribute(thing, "description", "LOL")
Note that doPlayerAddItem doesn't return uid in npc scripts.
 
Code:
local item = doPlayerAddItem(cid, 7844)
doItemSetAttribute(item, "aid", 10901)
doItemSetAttribute(item, "description", "LOL")
@edit
damn, cykotitan was faster :p

17:39 You see a paper.
It weighs 1.00 oz.
LOL
ItemID: [7844], ActionID: [10901].
 
Back
Top