# S022

> trigger argument does not match the alert payload

**Severity** Error

An alert declared with `payload: T` must be triggered with exactly one value of type `T`; an alert without a payload is triggered with no argument. The call here passes the wrong number of values.

Match the declaration: add the payload record, remove the stray argument, or change the declaration.

## Failing example

```flowscope
script "Funding extreme"
data funding = subscribe(data.funding)
type FundingHit {
  rate: float
}
alert extreme = alert(title: "Extreme funding", payload: FundingHit)
on funding.close {
  let r = funding.rate ?? 0.0
  if math.abs(r) > 0.001 {
    extreme.trigger()
  }
}
```

## Fixed example

```flowscope
script "Funding extreme"
data funding = subscribe(data.funding)
type FundingHit {
  rate: float
}
alert extreme = alert(title: "Extreme funding", payload: FundingHit)
on funding.close {
  let r = funding.rate ?? 0.0
  if math.abs(r) > 0.001 {
    extreme.trigger(FundingHit { rate: r })
  }
}
```

## Related

- [S020](/docs/scripting/reference/diagnostics/s020)
- [T204](/docs/scripting/reference/diagnostics/t204)
- [T205](/docs/scripting/reference/diagnostics/t205)
