PDA

View Full Version : Container



BTpat
03-28-2016, 04:18 PM
Hello, I wanted to ask if someone had the time to explain something to me.
I need to implement
---------------------------
function Container:UseItemWithGround('light shovel', 1267, 402, 7)
self = type(self) == 'table' and self or Container.New(self)
return containerUseItemWithGround(self._index,'alah uagber', 1267, 402, 7)
end
---------------------------
buuuuut it doesnt recognize the light shovel, so here I thought in the library it says (spot), so it needs a special value to funcion, so i went to the container section and there i tried to create a container, but i cant even get
--------------
function Container.New('16100')
-------------------
to be correct, allthou the itemid of the backpack is 16100 and that was the library says, that it needs the itemid.

No idea how to progress here:eek:

Jontor
03-28-2016, 09:57 PM
Maybe try using Self.UseItemWithGround(itemid, x, y, z) ?
Should be much easier for you

And the proper usage of that container function is like this


Container.UseItemWithGround(cont, spot, x, y, z)

But it needs another function ( made on your own ) that will return you the item you're looking for - which container and what spot is it

BTpat
03-29-2016, 01:14 PM
Hey, thanks for your reply. Well i tried that version and the only thing i get is
--------------
Error: attempt to call field 'UseItemwithGround' (a nil value)
--------------
It's a private server where you can use the shovel on sand to gather coins, can it be that xenobot doesnt approve such action since it doesnt exist in his registry?

ps. That ok from a kiosk right?

Jontor
03-30-2016, 03:32 PM
Hey, thanks for your reply. Well i tried that version and the only thing i get is
--------------
Error: attempt to call field 'UseItemwithGround' (a nil value)
--------------
It's a private server where you can use the shovel on sand to gather coins, can it be that xenobot doesnt approve such action since it doesnt exist in his registry?

ps. That ok from a kiosk right?

`UseItemwithGround` is not a function, but UseItemWithGround is
You missed an uppercase letter "w"

BTpat
04-06-2016, 07:02 PM
Briliant it works now all right, thanks.
Bisch eht kein schwizer?