Table of Contents

Class PapyrusArguments

Namespace
SkyrimForge.Papyrus
Assembly
SkyrimForge.Game.dll

Arguments for a Papyrus call, built one at a time.

public sealed class PapyrusArguments
Inheritance
PapyrusArguments
Inherited Members

Remarks

Pass one to a single call and then discard it. The call frees it, so adding to one passed to a call already, or passing it to a second call, throws InvalidOperationException.

Methods

Add(IForm?)

Appends a form, bound to the class the function declares once the dispatch names it.

public PapyrusArguments Add(IForm? form)

Parameters

form IForm

Returns

PapyrusArguments

Add(bool)

Appends a bool argument.

public PapyrusArguments Add(bool value)

Parameters

value bool

Returns

PapyrusArguments

Add(IReadOnlyCollection<bool>?)

Appends an array of bools. Null appends None rather than an array of no entries.

public PapyrusArguments Add(IReadOnlyCollection<bool>? values)

Parameters

values IReadOnlyCollection<bool>

Returns

PapyrusArguments

Exceptions

InvalidOperationException

The Papyrus VM does not exist, did not allocate the array, or allocated one of another length. A Papyrus array stores at most 128 entries.

Add(IReadOnlyCollection<int>?)

Appends an array of ints. Null appends None rather than an array of no entries.

public PapyrusArguments Add(IReadOnlyCollection<int>? values)

Parameters

values IReadOnlyCollection<int>

Returns

PapyrusArguments

Exceptions

InvalidOperationException

The Papyrus VM does not exist, did not allocate the array, or allocated one of another length. A Papyrus array stores at most 128 entries.

Add(IReadOnlyCollection<float>?)

Appends an array of floats. Null appends None rather than an array of no entries.

public PapyrusArguments Add(IReadOnlyCollection<float>? values)

Parameters

values IReadOnlyCollection<float>

Returns

PapyrusArguments

Exceptions

InvalidOperationException

The Papyrus VM does not exist, did not allocate the array, or allocated one of another length. A Papyrus array stores at most 128 entries.

Add(IReadOnlyCollection<string?>?)

Appends an array of strings. A null entry is set as the empty string, as a lone string argument is.

public PapyrusArguments Add(IReadOnlyCollection<string?>? values)

Parameters

values IReadOnlyCollection<string>

Returns

PapyrusArguments

Exceptions

InvalidOperationException

The Papyrus VM does not exist, did not allocate the array, or allocated one of another length. A Papyrus array stores at most 128 entries.

Add(int)

Appends an int argument.

public PapyrusArguments Add(int value)

Parameters

value int

Returns

PapyrusArguments

Add(float)

Appends a float argument.

public PapyrusArguments Add(float value)

Parameters

value float

Returns

PapyrusArguments

Add(string?)

Appends a string. Null is appended as the empty string.

public PapyrusArguments Add(string? value)

Parameters

value string

Returns

PapyrusArguments

Add<TForm>(IEnumerable<TForm>?)

Appends an array of forms, which Papyrus reads as an array of whatever class the parameter declares.

public PapyrusArguments Add<TForm>(IEnumerable<TForm>? forms) where TForm : IForm

Parameters

forms IEnumerable<TForm>

Returns

PapyrusArguments

Type Parameters

TForm

Remarks

The array itself is allocated at the dispatch too, the virtual machine allocating an array against the type of its entries, which for objects is the class the parameter declares. An array of numbers is allocated as it is appended, the overload settling its entry type.

An empty sequence arrives in Papyrus as None: the virtual machine allocates an array of no entries, and Papyrus reads that as None. An empty array and None differ in the Variable and in nothing a script can see.

Create()

Allocates an empty native argument list for one call.

public static PapyrusArguments Create()

Returns

PapyrusArguments

Exceptions

InvalidOperationException

The list could not be allocated.