# GetMemblockShort

## Description

Returns the short (2 byte) value at the given offset. The offset must be less than the size of the memblock. The first value is at offset 0. The offset must be a multiple of 2 as short values cannot be read across 2 byte boundaries. Short values are stored in little endian format so writing a short of 23 at offset 0 and then reading it back in bytes would return the byte at offset 0 as 23 and the byte at offset 1 as 0. The returned value will be a signed byte between -32768 and 32767.

## Definition

integer GetMemblockShort( memID, offset )

int agk::GetMemblockShort( UINT memID, UINT offset )

## Parameters

- memID - The ID of the memblock to check.
- offset - The offset from the start of the memblock of the value to return, between 0 and size.