Skip to content

ams:kill()

Captain Spaulding edited this page Mar 9, 2021 · 5 revisions

DESCRIPTION

This method kills the task referenced by the given <task_ID> and frees it from the scheduler.

SYNTAX

ams:kill(<task_ID>)

PARAMETERS

  • <task_ID> - the ID of the task.

RETURNS

None.

REQUIRES

  • require('ams')

EXAMPLES

require('ams')

local function my_funct(self)
	print("Hello World!")
end

local function my_other_funct(self)
	if self.parm.count > 0 then
		self.parm.count = self.parm.count - 1
		return
	end

	ams:kill(self.parm.slaveID)	--> kills the slave process, referenced by ID
	self:kill()			--> kills itself
end

local _, slaveID = ams:exec(my_funct, "My test function")
ams:exec(my_other_funct,"My other test function", ams.C.OFTEN, {count = 20, slaveID = slaveID})

ams.core

ams.sys

  • ams.sys.info
  • ams.sys.timer
  • ams.sys.win.timer

ams.SDK

  • ams.SDK.XPML
  • ams.SDK.scenery
  • ams.SDK.map
  • ams.SDK.datarefs
  • ams.SDK.AIplanes
  • ams.SDK.menus
  • ams.SDK.processing
  • ams.SDK.graphics

ams.carillon

  • ams.carillon.carillon

ams.utils

  • ams.utils.tts

ams.install

  • ams.install.loader

ams.ext

kickstarter

AMS Scripts

Clone this wiki locally