<Kotlin: UByte being seen as UInt> Kotlin Version:...
# stackoverflow
r
Kotlin: UByte being seen as UInt Kotlin Version: 2.0.20 I am trying to add 1 to a UByte in an array of UBytes, but Kotlin is returning it as an error saying "Type Mismatch. Required: UByte Found: UInt" @OptIn(ExperimentalUnsignedTypes::class) var command = ubyteArrayOf(0x85.toUByte(), 0x22.toUByte(), 0x44.toUByte(), 0x88.toUByte(), 0x00.toUByte()) command[0] += 1.toUByte() Here is what I have tried: I have tried creating a separate variable that was initialized as a Ubyte Instead of using just a "1", I have tried 0x01 and...