Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> itmprpbytget() / itmprpbytset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ItmPrpBytGet() / ItmPrpBytSet()
------------------------------------------------------------------------------
 Warning:
 USE WITH EXTREME CAUTION.

 Serious damage can be done to the bindery if misused.

 Purpose:
 Get / set a byte in an item property value.

 Syntax:
 wASCVal = ItmPrpBytGet(lpszObjName, iObjType, lpszPropName, iOffset)
 wASCVal = ItmPrpBytSet(lpszObjName, iObjType, lpszPropName, iOffset,
           lpszNewByte )

 Parameters:
 lpszObjName  The object name.
 iObjType     The object type.
 lpszPropName The property name.
 iOffset      The offset into the value.
 lpszNewByte  The new byte value.

 Returns:
 A numeric value (unsigned short int).

 Description:
 ItmPrpBytGet() returns a single byte from the specified property
 value of an object. lpszObjName is the object name and iObjType its type.
 lpszPropName is the name of the property and iOffset is the offset into
 the property value containing the byte. A property value can contain
 straight binary information, therefore it may be useful to change
 specific portions of the value.

 ItmPrpBytSet() changes the byte at iOffset to lpszNewByte, and
 returns the old byte value (range 0 to 255), or NOVERRINT if an error
 occurs.

 Example:
 // To change the number of grace logins user DAVE is allowed to 3.
 // Grace logins is a single byte contained in a property called
 // LOGIN_CONTROL; its exact position is offset 7:
 iOldGrace=ItmPrpBytSet("DAVE", OT_USER, "LOGIN_CONTROL", 7, CHR(3))
 iNewGrace=ItmPrpBytGet("DAVE", OT_USER, "LOGIN_CONTROL", 7)
 if ( iNewGrace != NOVERRINT )
    ? "User DAVE's new grace login count is", iNewGrace
 endif

 Notes:
 For more information on properties, their values and how they are
 constructed, please refer to Bindery Functions, Chapter 3.

 May require Supervisor equivalence.

See Also: ItmPrpValGet() / ItmPrpValSet() ItmPrpStrGet() / ItmPrpStrSet() ObjPrpLst()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson