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

Solved set action id not working

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
Here is the error Im getting in my console (I'm using cyring damson 8.60 0.3.6)

Code:
[23/09/2012 12:53:00] data/actions/scripts/lightblue1.lua:onUse
[23/09/2012 12:53:00] Description: 
[23/09/2012 12:53:00] data/actions/scripts/lightblue1.lua:19: attempt to call global 'doSetItemActionId' (a nil value)
[23/09/2012 12:53:00] stack traceback:
[23/09/2012 12:53:00] 	data/actions/scripts/lightblue1.lua:19: in function <data/actions/scripts/lightblue1.lua:16>

Here are lines 16 through 21 of my code

Code:
function restore(cid, item1, item2, actionid)
		doRemoveItem(getTileItemById(posa, smallrock).uid)         
		doCreateItem(bigrock,posa)	                              
		doSetItemActionId(getTileItemById(posa, bigrock).uid, 4002) 												--set AID
			return true
end

What did I do wrong? Rep to whoever helps me.
 
Last edited:
Lua:
function restore(cid, item1, item2, actionid)
	doRemoveItem(getTileItemById(posa, smallrock).uid)         
	doCreateItem(bigrock,posa)	                              
	setItemAttribute(getTileItemById(posa, bigrock).uid, "aid", 4002)
	return true
end
 
I get this error with this:

Code:
[23/09/2012 13:36:15] data/actions/scripts/lightblue2.lua:19: attempt to call global 'setItemAttribute' (a nil value)
[23/09/2012 13:36:15] stack traceback:
[23/09/2012 13:36:15] 	data/actions/scripts/lightblue2.lua:19: in function <data/actions/scripts/lightblue2.lua:16>
 
It keeps saying this line

Code:
doItemSetAttribute(getTileItemById(posa, bigrock).uid, 4002)

It keeps saying "item not found" for this line, so what is wrong with this line of code? posa is already set and DOES work since the crystal respawns, and bigrock is already set since... it respawns as a big rock so.... i dont get what i did wrong.
 
Thanks sn4ake, I tried that but it didn't work but it gave me the idea to try:

doItemSetAttribute(getTileItemById(posa, bigrock).uid, "aid", 4002)

and that DID work so I gave you rep, thanks!
 
Back
Top