# Why do i get this error? Argument of type ‘() =\> number’ is not assignable to parameter of type ‘number’

**URL:** https://forum.makecode.com/t/why-do-i-get-this-error-argument-of-type-number-is-not-assignable-to-parameter-of-type-number/26331
**Category:** EV3
**Created:** [January 25, 2024, 10:16pm UTC](https://forum.makecode.com/t/why-do-i-get-this-error-argument-of-type-number-is-not-assignable-to-parameter-of-type-number/26331 "2024-01-25T22:16:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)
#### Post date: [January 25, 2024, 10:16pm UTC](https://forum.makecode.com/t/why-do-i-get-this-error-argument-of-type-number-is-not-assignable-to-parameter-of-type-number/26331/1 "2024-01-25T22:16:30Z")

</div>

> Argument of type ‘() =\> number’ is not assignable to parameter of type ‘number’.

Heres the codeblock related:

```auto
function percentage(partialValue: number, totalValue: number) {
    return (100 * partialValue) / totalValue
}
sensors.gyro4.calibrate()
console.sendToScreen()
forever(function () {
    y = percentage(sensors.gyro4.angle, gyroVals.FULLPOWER)
})

```

happens at

> y = percentage(sensors.gyro4.angle, gyroVals.FULLPOWER)

---

<div class="post-metadata">

### Author: ![THEb0nny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theb0nny/32/3500_2.png) [@THEb0nny](https://forum.makecode.com/u/THEb0nny)
#### Post date: [September 1, 2026, 8:33pm UTC](https://forum.makecode.com/t/why-do-i-get-this-error-argument-of-type-number-is-not-assignable-to-parameter-of-type-number/26331/2 "2026-09-01T20:33:08Z")

</div>

sensors.gyro4.angle()
