Home  Contents

mtd16:contains

Mtd16 Core4 Lua Commands

SYNOPSIS

flag = msg:contains(tag)

DESCRIPTION

Checks if msg contains a data field tagged with tag. If tag is not a number, it is looked up in the table mtd16.lutTag to get its numerical value.

RETURN VALUE

Returns a boolean indicating the presence of tag in msg.

ERRORS

Raises an error if msgCode could not be converted to a number by looking it up in mtd16.lutTag.

EXAMPLE

>  >  > 
msg = mtd16.new(0xF00F) msg:append(0x3001, "FNORD!") print(msg:contains(0x3001))
true

SEE ALSO