Trying to make a Drone Mod?! Error in script...

Started by ninekorn, July 10, 2017, 04:34:19 PM

ninekorn

Neither of my container spawning lines work (containerid  or cont_id)... They give me an error in the console when i try to use my device? If anybody knows what im doing wrong id really love to know. Thanks for the help in advance. I try to spawn a container to test the NPC behavior after that on the crate. I also try to spawn them away from the player ship so that no collision occurs.

nine


function OnStart(args)
{
   var shipID = args.ship_id;
   var name = game.GetShipOwner(shipID);
   var sysID = args.sys_id;
   var coords = ship.GetCoordinates(shipID);

   var item_list = "droplist_empty";

   //var containerid = generator.AddContainer(sysID,coords.x+5,coords.y+5,"crate_02",item_list);
    var cont_id = generator.AddContainer(sysID, coords.x+5,coords.y+5,"crate_02", item_list, { itemlist: item_list });

   //console.Print(shipID);
   //console.Print(name);
   //console.Print(coords.x);
   //console.Print(coords.y);
}





EDIT: I found my mistake. !  ;D


Lurler