Skip to main content

sys.xfer_upgrade_to_caller

sys.xfer_upgrade_to_caller allows a script to send upgrades to the caller of the script.

Security Level​

FULLSEC

Syntax​

CLI​

sys.xfer_upgrade_to_caller

Script​

Single upgrade:

#fs.sys.xfer_upgrade_to_caller({ i: 0 })

Multiple upgrades:

#fs.sys.xfer_upgrade_to_caller({ i: [ 0, 1, 2 ] })

Parameters​

Requires one of 'i' or 'sn'.

i​

The 'i' argument takes a number or array of numbers and specifies which upgrade indexes shall be sent.

sn​

The 'sn' argument takes a serial number string, or array of serial numbers, to specify which serial numbers shall be sent (if they exist on the user).

memo (optional)​

The 'memo' argument allows for an optional memo, up to 50 characters, alongside the upgrade transfer

Return​

Returns a Success or Failure object.

CLI​

>>sys.xfer_upgrade_to_caller
Usage: (in subscript) #fs.sys.xfer_upgrade_to_caller({ i:<upgrade index or array>, sn:<upgrade SN or array>, memo:"<optional memo (50/1)>" })

Script​

Success

-k3y_v2- lost to trust

Errors​

Known error responses for a Failure object:

  • You can't transfer to yourself.
  • can't transfer loaded upgrades.
  • invalid index
  • transfer_upgrades could not continue executing because 250ms are not available for execution.
  • Not enough slots available in recipient for transfer. ${N} slots available.
  • Sys needs to be tier ${N} before it can get this upgrade.

Example​

function(context, args)
{
return #fs.sys.xfer_upgrade_to_caller({ i: 44 })
}