Author Topic: Trying to make a Drone Mod?! Error in script...  (Read 83 times)

ninekorn

  • Newbie
  • *
  • Posts: 41
    • View Profile
Trying to make a Drone Mod?! Error in script...
« on: July 10, 2017, 04:34:19 pm »
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

« Last Edit: July 10, 2017, 05:14:36 pm by ninekorn »

Lurler

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1022
    • View Profile
Re: Trying to make a Drone Mod?! Error in script...
« Reply #1 on: July 12, 2017, 06:44:03 am »
What was the mistake then? :)