Scripting API items.RemoveItem not recognized as a function!

Started by ninekorn, July 26, 2017, 08:31:50 PM

ninekorn

Hi,

The Scripting API doesnt seem to recognize items.RemoveItem not recognized as a function! I've also tried station.RemoveItem or generator.RemoveItem or game.RemoveItem but none seem to work. items.RemoveCargo won't work because im trying to remove items from the station shop container. This is for my galaxy market mod.

Thank you in advance.
nine

ai_enabled

Hello,

I don't know who wrote API :-)  but it's really unexpected API method name:

items.RemoveItemQuantity(int container_id, int item_id, int quantity);

(if the quantity is zero - remove item completely).

ninekorn

Ok! Tested it and it works! Thanks. I can now buy items in the whole galaxy. The items go in the player storage Inside the station where the item was bought and 1 item is removed from the station themselves.

ai_enabled