Welcome to PenUltima Online. Click to login or register.
CreatePacket(type, size)
Parameters:
Name Type
type Integer
size Integer
Explanation
Creates a new packet object. Type is the byte command id that always is set as the first byte (no need to set it yourself). Size is the fixed-length size for this packet, or MSGLEN_VARIABLE if it is variable length (no need to figure out the size in advance, the packet buffer will be resized as need by using the Set* methods).
Notes: polsys.em constants for this function:
const MSGLEN_VARIABLE := -1;
Return values
A new packet object or Error
Errors
"Invalid parameter type."
"Packet type too high"
Related
Packet